[Telepathy-commits] [telepathy-salut/master] Pass the channel instance into accept_local_socket_connection in case the GibberFileTransfer object hasn't been made yet.

Jonny Lamb jonny.lamb at collabora.co.uk
Fri Nov 21 03:46:20 PST 2008


Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
 src/salut-file-channel.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/salut-file-channel.c b/src/salut-file-channel.c
index 18c172c..990058f 100644
--- a/src/salut-file-channel.c
+++ b/src/salut-file-channel.c
@@ -1160,10 +1160,9 @@ accept_local_socket_connection (GIOChannel *source,
     {
       DEBUG ("Client connected to local socket");
 
-      ft = (GibberFileTransfer *) user_data;
+      ft = ((SalutFileChannel *) user_data)->priv->ft;
 
-      if (ft == NULL)
-        return FALSE;
+      g_assert (ft != NULL);
 
       addrlen = sizeof (addr);
       new_fd = accept (g_io_channel_unix_get_fd (source),
@@ -1202,7 +1201,7 @@ setup_local_socket (SalutFileChannel *self)
     }
 
   g_io_add_watch (io_channel, G_IO_IN | G_IO_HUP,
-      accept_local_socket_connection, self->priv->ft);
+      accept_local_socket_connection, self);
   g_io_channel_unref (io_channel);
 
   return TRUE;
-- 
1.5.6.5




More information about the Telepathy-commits mailing list