From: Trent Lloyd Date: Fri, 17 Jun 2005 13:43:17 +0000 (+0000) Subject: * more dbus build fixes X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=514a726560b8e8582abff7ccbc6e69ade5cdb04a;p=catta * more dbus build fixes git-svn-id: file:///home/lennart/svn/public/avahi/trunk@121 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/avahi-daemon/dbus-protocol.c b/avahi-daemon/dbus-protocol.c index aede620..5017061 100644 --- a/avahi-daemon/dbus-protocol.c +++ b/avahi-daemon/dbus-protocol.c @@ -109,7 +109,7 @@ signal_filter (DBusConnection *conn, DBusMessage *message, void *user_data) } int -dbus_protocol_setup () +dbus_protocol_setup (GMainLoop *loop) { DBusError error; @@ -122,7 +122,7 @@ dbus_protocol_setup () g_warning ("dbus_bus_get(): %s", error.message); dbus_error_free (&error); - goto finish; + return 1; } dbus_connection_setup_with_g_main (bus, NULL); @@ -135,7 +135,7 @@ dbus_protocol_setup () 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); @@ -148,8 +148,10 @@ dbus_protocol_setup () g_warning ("dbus_bus_add_match (): %s", error.message); dbus_error_free (&error); - goto finish; + return 1; } + + return 0; } void diff --git a/avahi-daemon/dbus-protocol.h b/avahi-daemon/dbus-protocol.h index 8ed583f..b2eca71 100644 --- a/avahi-daemon/dbus-protocol.h +++ b/avahi-daemon/dbus-protocol.h @@ -24,7 +24,9 @@ #define DBUS_SERVICE_AVAHI "org.freedesktop.Avahi" -int dbus_protocol_setup (); -int dbus_protocol_shutdown (); +#include + +int dbus_protocol_setup (GMainLoop *loop); +void dbus_protocol_shutdown (); #endif diff --git a/avahi-daemon/main.c b/avahi-daemon/main.c index 3ac3a63..4a8d44d 100644 --- a/avahi-daemon/main.c +++ b/avahi-daemon/main.c @@ -62,7 +62,7 @@ int main(int argc, char *argv[]) { goto finish; #ifdef ENABLE_DBUS - if (dbus_protocol_setup () < 0) + if (dbus_protocol_setup (loop) < 0) goto finish; #endif