[telepathy-gabble/master] fire NewLocalConnection

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Wed May 20 02:17:39 PDT 2009


---
 src/tube-stream.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/tube-stream.c b/src/tube-stream.c
index 318eb84..f5b000b 100644
--- a/src/tube-stream.c
+++ b/src/tube-stream.c
@@ -560,6 +560,18 @@ generate_connection_id (GabbleTubeStream *self,
 }
 
 static void
+fire_new_local_connection (GabbleTubeStream *self,
+    GibberTransport *transport)
+{
+  guint connection_id;
+
+  connection_id = generate_connection_id (self, transport);
+
+  gabble_svc_channel_type_stream_tube_emit_new_local_connection (self,
+      connection_id);
+}
+
+static void
 credentials_received_cb (GibberUnixTransport *transport,
                          GibberBuffer *buffer,
                          GibberCredentials *credentials,
@@ -599,6 +611,10 @@ credentials_received_cb (GibberUnixTransport *transport,
     {
       DEBUG ("SI failed. Closing connection");
     }
+  else
+    {
+      fire_new_local_connection (self, GIBBER_TRANSPORT (transport));
+    }
 
 credentials_received_cb_out:
   /* start_stream_initiation reffed the transport if everything went fine */
@@ -726,6 +742,10 @@ local_new_connection_cb (GibberListener *listener,
     {
       DEBUG ("closing new client connection");
     }
+  else
+    {
+      fire_new_local_connection (self, transport);
+    }
 }
 
 static gboolean
-- 
1.5.6.5




More information about the telepathy-commits mailing list