summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMikhail Zabaluev <mikhail.zabaluev@nokia.com>2008-05-20 17:26:18 +0000
committerMikhail Zabaluev <mikhail.zabaluev@nokia.com>2008-05-20 17:26:18 +0000
commit70c23413cc4751c94b53c9a512e93b80098b7a99 (patch)
tree7ccfb9fd6d333654e8a8ef0974677eef291bdf03 /src
parent55b0ae788ca30782346e2a9fffd8ad9e68dc80c9 (diff)
Don't remove or apply the remote pending send flag if there is a pending SDP offer
Diffstat (limited to 'src')
-rw-r--r--src/sip-media-session.c27
-rw-r--r--src/sip-media-stream.c10
-rw-r--r--src/sip-media-stream.h2
3 files changed, 12 insertions, 27 deletions
diff --git a/src/sip-media-session.c b/src/sip-media-session.c
index f55829e..3888814 100644
--- a/src/sip-media-session.c
+++ b/src/sip-media-session.c
@@ -585,6 +585,11 @@ priv_apply_streams_pending_send (TpsipMediaSession *session,
TpsipMediaStream *stream;
guint i;
+ /* If there has been a local change pending a re-INVITE,
+ * leave pending remote send for the next transaction */
+ if (priv->pending_offer)
+ pending_send_mask &= ~(guint)TP_MEDIA_STREAM_PENDING_REMOTE_SEND;
+
/* Apply the local pending send flags where applicable */
for (i = 0; i < priv->streams->len; i++)
{
@@ -1487,30 +1492,10 @@ priv_update_remote_media (TpsipMediaSession *session, gboolean authoritative)
TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
const sdp_media_t *media;
gboolean has_supported_media = FALSE;
- guint direction_up_mask;
guint i;
g_return_val_if_fail (priv->remote_sdp != NULL, FALSE);
- /*
- * Do not allow:
- * 1) an answer to bump up directions beyond what's been offered;
- * 2) an offer to remove the local hold.
- */
- if (authoritative)
- direction_up_mask
- = tpsip_media_session_is_local_hold_ongoing (session)
- ? TP_MEDIA_STREAM_DIRECTION_SEND
- : TP_MEDIA_STREAM_DIRECTION_BIDIRECTIONAL;
- else
- direction_up_mask = 0;
-
- /* Update the session-wide RTCP enable flag
- * before updating stream media */
-
- priv->rtcp_enabled = !tpsip_sdp_rtcp_bandwidth_throttled (
- priv->remote_sdp->sdp_bandwidths);
-
media = priv->remote_sdp->sdp_media;
/* note: for each session, we maintain an ordered list of
@@ -1551,7 +1536,7 @@ priv_update_remote_media (TpsipMediaSession *session, gboolean authoritative)
{
if (tpsip_media_stream_set_remote_media (stream,
media,
- direction_up_mask))
+ authoritative))
{
has_supported_media = TRUE;
continue;
diff --git a/src/sip-media-stream.c b/src/sip-media-stream.c
index 731515f..3f1ba35 100644
--- a/src/sip-media-stream.c
+++ b/src/sip-media-stream.c
@@ -951,8 +951,8 @@ priv_get_requested_direction (TpsipMediaStreamPrivate *priv)
*/
gboolean
tpsip_media_stream_set_remote_media (TpsipMediaStream *stream,
- const sdp_media_t *new_media,
- guint direction_up_mask)
+ const sdp_media_t *new_media,
+ gboolean authoritative)
{
TpsipMediaStreamPrivate *priv;
sdp_connection_t *sdp_conn;
@@ -1060,10 +1060,10 @@ tpsip_media_stream_set_remote_media (TpsipMediaStream *stream,
* (and playing status?) once remote info set */
push_active_candidate_pair (stream);
- /* Set the final direction and clear remote pending send flag */
+ /* Set the final direction and update pending send flags */
tpsip_media_stream_set_direction (stream,
- new_direction,
- TP_MEDIA_STREAM_PENDING_LOCAL_SEND);
+ new_direction,
+ TP_MEDIA_STREAM_PENDING_LOCAL_SEND);
return TRUE;
}
diff --git a/src/sip-media-stream.h b/src/sip-media-stream.h
index 07f4421..ee6af74 100644
--- a/src/sip-media-stream.h
+++ b/src/sip-media-stream.h
@@ -63,7 +63,7 @@ guint tpsip_media_stream_get_media_type (TpsipMediaStream *self);
const char *tpsip_media_stream_local_sdp (TpsipMediaStream *self);
gboolean tpsip_media_stream_set_remote_media (TpsipMediaStream *self,
const sdp_media_t *media,
- guint direction_up_mask);
+ gboolean authoritative);
void tpsip_media_stream_set_playing (TpsipMediaStream *self, gboolean playing);
void tpsip_media_stream_set_sending (TpsipMediaStream *self, gboolean sending);
void tpsip_media_stream_set_direction (TpsipMediaStream *stream,