diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2010-06-20 20:54:10 +0100 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2010-06-21 12:53:30 +0100 |
commit | 5b689a12e02ae6f14a57c6eba6454a368efd5edc (patch) | |
tree | 3c454cacba0fc91b749167c0d77eb1a9964f718d /src | |
parent | d88ee28524ae9bf3b751d6005584fda92a391e30 (diff) |
Save the pending flags that got applied, so we can apply them..
Diffstat (limited to 'src')
-rw-r--r-- | src/sip-media-stream.c | 12 |
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); |