Use GSocket and GSocketAddress from GIO.
[cascardo/f2fchat.git] / message.c
index 7c73006..1a66892 100644 (file)
--- a/message.c
+++ b/message.c
@@ -58,9 +58,9 @@ gboolean message_incoming(GIOChannel *channel, GIOCondition cond, gpointer data)
        return TRUE;
 }
 
-int message_init(int sock)
+int message_init(GSocket *sock)
 {
-       uchannel = g_io_channel_unix_new(sock);
+       uchannel = g_io_channel_unix_new(g_socket_get_fd(sock));
        g_io_add_watch(uchannel, G_IO_IN, message_incoming, NULL);
        return 0;
 }