telepathy-gabble: private-tubes-factory: simplify emit_new_channel code

Jonny Lamb jonny at kemper.freedesktop.org
Tue Aug 28 06:19:34 PDT 2012


Module: telepathy-gabble
Branch: master
Commit: 18f0ca014a92fcc40be0f4658a247687739fc1dd
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=18f0ca014a92fcc40be0f4658a247687739fc1dd

Author: Jonny Lamb <jonny.lamb at collabora.co.uk>
Date:   Wed Jul 18 17:40:32 2012 +0100

private-tubes-factory: simplify emit_new_channel code

Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>

---

 src/private-tubes-factory.c |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/src/private-tubes-factory.c b/src/private-tubes-factory.c
index 8ab993c..e8b8aa7 100644
--- a/src/private-tubes-factory.c
+++ b/src/private-tubes-factory.c
@@ -1374,23 +1374,16 @@ gabble_private_tubes_factory_requestotron (GabblePrivateTubesFactory *self,
 
   if (channel == NULL)
     {
-      GHashTable *channels;
-      GSList *request_tokens;
+      GSList *request_tokens = NULL;
 
       channel = new_channel_from_request (self, request_properties);
 
-      channels = g_hash_table_new_full (g_direct_hash, g_direct_equal,
-          NULL, NULL);
-
       if (request_token != NULL)
         request_tokens = g_slist_prepend (NULL, request_token);
-      else
-        request_tokens = NULL;
 
-      g_hash_table_insert (channels, channel, request_tokens);
-      tp_channel_manager_emit_new_channels (self, channels);
+      tp_channel_manager_emit_new_channel (self,
+          TP_EXPORTABLE_CHANNEL (channel), request_tokens);
 
-      g_hash_table_unref (channels);
       g_slist_free (request_tokens);
     }
   else



More information about the telepathy-commits mailing list