summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2010-06-20 20:54:10 +0100
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2010-06-20 20:54:10 +0100
commit6725855c7bf6f0f1e7ce96726ca0b0f8acc826ed (patch)
treec5d6dbf0a699a2c9ed79abe116e61faeb6394a9a
parentb610e20bb159dfbc0167e96a031b4c922c42c221 (diff)
Save the pending flags that got applied, so we can apply them..
-rw-r--r--src/sip-media-stream.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/sip-media-stream.c b/src/sip-media-stream.c
index 270c5c7..37e14df 100644
--- a/src/sip-media-stream.c
+++ b/src/sip-media-stream.c
@@ -1332,16 +1332,20 @@ tpsip_media_stream_apply_pending_direction (TpsipMediaStream *stream,
guint pending_send_mask)
{
TpsipMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (stream);
+ guint flags;
+
/* Don't apply pending send for new streams that haven't been negotiated */
if (priv->remote_media == NULL)
return;
- if ((priv->pending_send_flags & pending_send_mask) != 0)
- {
- priv->pending_send_flags &= ~pending_send_mask;
+ /* Remember the flags that got changes and then clear the set */
+ flags = (priv->pending_send_flags & pending_send_mask);
+ priv->pending_send_flags &= ~pending_send_mask;
- if ((priv->pending_send_flags & TP_MEDIA_STREAM_PENDING_LOCAL_SEND) != 0)
+ if (flags != 0)
+ {
+ if ((flags & TP_MEDIA_STREAM_PENDING_LOCAL_SEND) != 0)
priv->direction |= TP_MEDIA_STREAM_DIRECTION_SEND;
DEBUG("set direction %u, pending send flags %u", priv->direction, priv->pending_send_flags);