summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSenko Rasic <senko.rasic@collabora.co.uk>2010-02-22 12:40:02 +0100
committerSenko Rasic <senko.rasic@collabora.co.uk>2010-02-22 12:40:02 +0100
commit19c3fa9c433bda758a06f2f5d043394945ead198 (patch)
tree52b8b20aaf15325b0374d0918510f50d81b8a5f2 /src
parent6735c9737e81b1293a91f408f3118306a04cbfc7 (diff)
Don't send a content-modify message if the content hasn't been sent yet.
Backport of commit 5a7757ca53b83ee6904354f02a4caa0ade0a11eb from 0.9.x.
Diffstat (limited to 'src')
-rw-r--r--src/jingle-content.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/jingle-content.c b/src/jingle-content.c
index cac4c745b..9120c51cb 100644
--- a/src/jingle-content.c
+++ b/src/jingle-content.c
@@ -959,12 +959,18 @@ gabble_jingle_content_change_direction (GabbleJingleContent *c,
priv->senders = senders;
- msg = gabble_jingle_session_new_message (c->session,
- JINGLE_ACTION_CONTENT_MODIFY, &sess_node);
- gabble_jingle_content_produce_node (c, sess_node, FALSE, FALSE, NULL);
- gabble_jingle_session_send (c->session, msg, NULL, NULL);
+ /* only signal content modification if the content has been sent
+ * to the peer already. */
+ if (priv->state >= JINGLE_CONTENT_STATE_SENT)
+ {
+ msg = gabble_jingle_session_new_message (c->session,
+ JINGLE_ACTION_CONTENT_MODIFY, &sess_node);
+ gabble_jingle_content_produce_node (c, sess_node, FALSE, FALSE, NULL);
+ gabble_jingle_session_send (c->session, msg, NULL, NULL);
+
+ /* FIXME: actually check whether remote end accepts our content-modify */
+ }
- /* FIXME: actually check whether remote end accepts our content-modify */
return TRUE;
}