summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2013-04-16 17:09:38 (GMT)
committerWill Thompson <will.thompson@collabora.co.uk>2013-06-11 15:56:37 (GMT)
commitd8fcf78cf9bbad0b822b3368479cea532f11dc83 (patch)
treed3dabdbc776d80dadaeb55592f97ae6ab04cdb6a
parent7f139058d3323d99b11667f93cb4abcb3ccc9c4d (diff)
downloadwocky-d8fcf78cf9bbad0b822b3368479cea532f11dc83.tar.gz
wocky-d8fcf78cf9bbad0b822b3368479cea532f11dc83.tar.xz
Jingle: wait for session-initiate ack, then send candidates
There seems to be a race condition in Jitsi: if we send a transport-info full of candidates immediately after sending a session-info, it sometimes seems to miss the candidates we send it. Waiting until after it acks our session-initiate seems to do the trick. This is only visible in an application which only ever sends a single local candidate, immediately after initiating; it is probably masked in Telepathy by new candidates trickling in after the call starts as we get STUN replies. The previous code would call _transmit_candidates when accepting a call, too, but I don't think this is necessary: in the case where the call is incoming, wocky_jingle_content_add_candidate() will tell the transport to send out new candidates as they are added because the state is > EMPTY. https://bugs.freedesktop.org/show_bug.cgi?id=65657
-rw-r--r--wocky/wocky-jingle-session.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/wocky/wocky-jingle-session.c b/wocky/wocky-jingle-session.c
index 02a96b1..eea37ab 100644
--- a/wocky/wocky-jingle-session.c
+++ b/wocky/wocky-jingle-session.c
@@ -1921,6 +1921,9 @@ _on_initiate_reply (
priv->remote_ringing = TRUE;
g_signal_emit (sess, signals[REMOTE_STATE_CHANGED], 0);
}
+
+ /* now all initial contents can transmit their candidates */
+ _map_initial_contents (sess, _transmit_candidates, NULL);
}
else
{
@@ -2075,9 +2078,6 @@ try_session_initiate_or_accept (WockyJingleSession *sess)
msg, NULL, handler, g_object_ref (sess));
g_object_unref (msg);
set_state (sess, new_state, 0, NULL);
-
- /* now all initial contents can transmit their candidates */
- _map_initial_contents (sess, _transmit_candidates, NULL);
}
/**