summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert McQueen <robert.mcqueen@collabora.co.uk>2006-09-04 16:40:57 +0000
committerRobert McQueen <robert.mcqueen@collabora.co.uk>2006-09-04 16:40:57 +0000
commitbf4b7e28e04a340eeb9f35ca4f8f3da98756d57b (patch)
tree87602c979f84955b8c8d89038d92b8533f124ac8
parent272926d973a926d80b510913833a5ff5736ce929 (diff)
GabbleMediaSession: add asserts to send_reject_message to make sure we only do it in google mode, and add a comment to send_terminate_message to explain why we do nothing if the resource is NULL
-rw-r--r--src/gabble-media-session.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gabble-media-session.c b/src/gabble-media-session.c
index 7766757db..205aa3f70 100644
--- a/src/gabble-media-session.c
+++ b/src/gabble-media-session.c
@@ -1421,8 +1421,11 @@ send_reject_message (GabbleMediaSession *session)
LmMessage *msg;
LmMessageNode *session_node;
- if (priv->peer_resource == NULL)
- return;
+ /* this should only happen in google mode, and we should only arrive in that
+ * mode when we've ended up talking to a resource that doesn't support
+ * jingle */
+ g_assert (priv->mode == MODE_GOOGLE);
+ g_assert (priv->resource != NULL);
/* construct a session terminate message */
msg = _gabble_media_session_message_new (session, "reject", &session_node);
@@ -1444,6 +1447,8 @@ send_terminate_message (GabbleMediaSession *session)
LmMessage *msg;
LmMessageNode *session_node;
+ /* if we have no resource, then we've not sent or received any messages about
+ * this session yet, so no terminate is necessary */
if (priv->peer_resource == NULL)
return;