[telepathy-gabble/master] Add explanatory comment for <reason> processing

Will Thompson will.thompson at collabora.co.uk
Fri Mar 27 04:50:16 PDT 2009


---
 src/jingle-session.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/jingle-session.c b/src/jingle-session.c
index b47a576..a5d5055 100644
--- a/src/jingle-session.c
+++ b/src/jingle-session.c
@@ -928,6 +928,13 @@ on_session_terminate (GabbleJingleSession *sess, LmMessageNode *node,
   LmMessageNode *n = lm_message_node_get_child (node, "reason");
   ReasonMapping *m = NULL;
 
+  /* If the session-terminate stanza has a <reason> child, then iterate across
+   * its children, looking for a child whose name we recognise as a
+   * machine-readable reason for the call ending (looked up from the table
+   * above). (The XEP also defines <text> for a human-readable message. TODO:
+   * expose and send that as the group change message.) Once we find a reason
+   * we recognise, break out of both loops.
+   */
   if (n != NULL)
     for (n = n->children; n != NULL; n = n->next)
       for (m = reasons; m->element != NULL; m++)
-- 
1.5.6.5



More information about the telepathy-commits mailing list