summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2012-02-24 02:55:18 (GMT)
committerOlivier CrĂȘte <olivier.crete@collabora.com>2012-02-24 20:49:09 (GMT)
commit9f725fe9a199a77fbde1b0d57778b5edb113781c (patch)
treede904ff7c70dbb6aae08eeeabd8dec63e2a21351
parentdfd72a979c07ee9ce91d8b9a7aa920c214108356 (diff)
downloadtelepathy-glib-9f725fe9a199a77fbde1b0d57778b5edb113781c.tar.gz
telepathy-glib-9f725fe9a199a77fbde1b0d57778b5edb113781c.tar.xz
Call.Content.I.Media: Reject updates while offer is pending
Reject updates to the local while there is an offer pending
-rw-r--r--telepathy-glib/base-media-call-content.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/telepathy-glib/base-media-call-content.c b/telepathy-glib/base-media-call-content.c
index f10131c..326e778 100644
--- a/telepathy-glib/base-media-call-content.c
+++ b/telepathy-glib/base-media-call-content.c
@@ -728,6 +728,16 @@ tp_base_media_call_content_update_local_media_description (
return;
}
+ if (self->priv->current_offer != NULL &&
+ tp_call_content_media_description_get_remote_contact (self->priv->current_offer) == GPOINTER_TO_UINT (contact))
+ {
+ GError error = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ "Can not update the media description while there is"
+ " an outstanding offer for this contact." };
+ dbus_g_method_return_error (context, &error);
+ return;
+ }
+
set_local_properties (self, GPOINTER_TO_UINT (contact), properties);
tp_svc_call_content_interface_media_return_from_update_local_media_description