telepathy-rakia: Only reject codecs on the proper error

Olivier Crête tester at kemper.freedesktop.org
Tue May 8 10:03:01 PDT 2012


Module: telepathy-rakia
Branch: master
Commit: ccf9654e5b987a552660769d1649a93d5401acb6
URL:    http://cgit.freedesktop.org/telepathy/telepathy-rakia/commit/?id=ccf9654e5b987a552660769d1649a93d5401acb6

Author: Olivier Crête <olivier.crete at collabora.com>
Date:   Fri Feb 24 15:48:23 2012 -0500

Only reject codecs on the proper error

---

 rakia/call-content.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/rakia/call-content.c b/rakia/call-content.c
index 6031601..d54d587 100644
--- a/rakia/call-content.c
+++ b/rakia/call-content.c
@@ -299,11 +299,17 @@ md_offer_cb (GObject *obj, GAsyncResult *res, gpointer user_data)
     }
   else
     {
-      g_assert (!is_initial_offer);
+      /* Only reject if the codecs where rejected */
+      if (error->domain == TP_ERRORS &&
+          error->code == TP_ERROR_MEDIA_CODECS_INCOMPATIBLE)
+        {
+          g_assert (!is_initial_offer);
 
-      rakia_sip_media_codecs_rejected (priv->media);
+          rakia_sip_media_codecs_rejected (priv->media);
 
-      DEBUG ("Codecs rejected: %s", error->message);
+          DEBUG ("Codecs rejected: %s", error->message);
+
+        }
 
       /* FIXME: We need to allow for partial failures */
       g_clear_error (&error);



More information about the telepathy-commits mailing list