[Telepathy-commits] [telepathy-salut/master] salut_tubes_manager_requestotron: salut_tubes_channel_tube_request is not suppose to return NULL and, anyway, it doesn't make sense to call tp_channel_manager_emit_request_already_satisfied on the tubes channel

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Fri Feb 6 03:15:05 PST 2009


---
 src/salut-tubes-manager.c |   23 +++++++----------------
 1 files changed, 7 insertions(+), 16 deletions(-)

diff --git a/src/salut-tubes-manager.c b/src/salut-tubes-manager.c
index f20059a..e0d3af9 100644
--- a/src/salut-tubes-manager.c
+++ b/src/salut-tubes-manager.c
@@ -952,6 +952,7 @@ salut_tubes_manager_requestotron (SalutTubesManager *self,
   else
     {
       SalutTubeIface *new_channel;
+      GSList *tokens = NULL;
 
       if (tubes_channel == NULL)
         {
@@ -963,25 +964,15 @@ salut_tubes_manager_requestotron (SalutTubesManager *self,
 
       new_channel = salut_tubes_channel_tube_request (tubes_channel,
           request_token, request_properties);
+      g_assert (new_channel != NULL);
 
-      if (new_channel != NULL)
-        {
-          GSList *tokens = NULL;
-
-          if (request_token != NULL)
-            tokens = g_slist_prepend (NULL, request_token);
+      if (request_token != NULL)
+        tokens = g_slist_prepend (NULL, request_token);
 
-          tp_channel_manager_emit_new_channel (self,
-              TP_EXPORTABLE_CHANNEL (new_channel), tokens);
-
-          g_slist_free (tokens);
-        }
-      else
-        {
-          tp_channel_manager_emit_request_already_satisfied (self,
-              request_token, TP_EXPORTABLE_CHANNEL (tubes_channel));
-        }
+      tp_channel_manager_emit_new_channel (self,
+          TP_EXPORTABLE_CHANNEL (new_channel), tokens);
 
+      g_slist_free (tokens);
       return TRUE;
     }
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list