Fixed g_source_attach() error checking.
[udpgate.git] / src / network.c
index 39d8f8f..c42fab9 100644 (file)
@@ -321,7 +321,7 @@ static gboolean sock_gsource_new(void)
                        sock_source_callback,  /* func */
                        NULL, /* data */
                        NULL);  /* notify */
-       if (g_source_attach(
+       if (!g_source_attach(   /* returns 'guint' id */
                        sock_gsource,  /* source */
                        NULL)) {        /* context; NULL means 'default context' */
                g_warning("g_source_attach(gsource,NULL): %m");