diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2010-10-20 13:32:29 +0100 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2010-10-20 13:34:26 +0100 |
commit | c003505d4ed35f007cd4b8c34e5adebc8972a6a8 (patch) | |
tree | c2cf6bd97138c3b419b81c3b2b92b504558fbb16 | |
parent | bee615727820e97aa4c0bd33a88c09805da69448 (diff) |
content: always pop up a new CodecOffer on new outgoing call content
Also disallow calling UpdateCodecs if there is a CodecOffer in flight.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r-- | src/call-content.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/call-content.c b/src/call-content.c index 152894730..8e296dc0c 100644 --- a/src/call-content.c +++ b/src/call-content.c @@ -555,6 +555,16 @@ gabble_call_content_update_codecs (GabbleSvcCallContentInterfaceMedia *iface, const GPtrArray *codecs, DBusGMethodInvocation *context) { + GabbleCallContent *self = GABBLE_CALL_CONTENT (iface); + + if (self->priv->offer != NULL) + { + GError error = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + "There is a codec offer around so UpdateCodecs shouldn't be called." }; + dbus_g_method_return_error (context, &error); + return; + } + call_content_set_local_codecs (GABBLE_CALL_CONTENT (iface), codecs); gabble_svc_call_content_interface_media_return_from_update_codecs (context); } @@ -904,10 +914,7 @@ gabble_call_content_add_member_content (GabbleCallContent *self, gabble_signal_connect_weak (content, "removed", G_CALLBACK (member_content_removed_cb), G_OBJECT (self)); - if (gabble_call_member_content_get_remote_codecs (content) != NULL) - { - call_content_new_offer (self); - } + call_content_new_offer (self); } GList * |