}
int
-dbus_protocol_setup ()
+dbus_protocol_setup (GMainLoop *loop)
{
DBusError error;
g_warning ("dbus_bus_get(): %s", error.message);
dbus_error_free (&error);
- goto finish;
+ return 1;
}
dbus_connection_setup_with_g_main (bus, NULL);
g_warning ("dbus_error_is_set (): %s", error.message);
dbus_error_free (&error);
- goto finish;
+ return 1;
}
dbus_connection_add_filter (bus, signal_filter, loop, NULL);
g_warning ("dbus_bus_add_match (): %s", error.message);
dbus_error_free (&error);
- goto finish;
+ return 1;
}
+
+ return 0;
}
void
#define DBUS_SERVICE_AVAHI "org.freedesktop.Avahi"
-int dbus_protocol_setup ();
-int dbus_protocol_shutdown ();
+#include <glib.h>
+
+int dbus_protocol_setup (GMainLoop *loop);
+void dbus_protocol_shutdown ();
#endif