From: Trent Lloyd Date: Tue, 2 Aug 2005 20:38:45 +0000 (+0000) Subject: * Fix a stupidity in avahi-client that stopped it from working. X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=4a26b34ce1c7c2b1f0b65028f5d096939ab9b164;p=catta * Fix a stupidity in avahi-client that stopped it from working. git-svn-id: file:///home/lennart/svn/public/avahi/trunk@210 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/avahi-client/client.c b/avahi-client/client.c index 6ff099a..290d767 100644 --- a/avahi-client/client.c +++ b/avahi-client/client.c @@ -41,9 +41,9 @@ filter_func (DBusConnection *bus, DBusMessage *message, void *data) goto out; } - if (strcmp (name, AVAHI_DBUS_NAME) < 0) { + if (strcmp (name, AVAHI_DBUS_NAME) == 0) { if (old == NULL && new != NULL) { - fprintf(stderr, "Avahi Daemon reconnected\n"); + fprintf(stderr, "Avahi Daemon connected\n"); } else if (old != NULL && new == NULL) { fprintf(stderr, "Avahi Daemon disconnected\n"); } @@ -56,7 +56,7 @@ out: return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } -static int _dbus_add_match (DBusConnection *bus, char *type, char *interface, char *sender, char *path) +static gint _dbus_add_match (DBusConnection *bus, char *type, char *interface, char *sender, char *path) { DBusError error; char *filter; @@ -84,8 +84,8 @@ avahi_client_new () AvahiClient *tmp; DBusError error; - tmp = malloc (sizeof (AvahiClient)); - tmp->priv = malloc (sizeof (AvahiClientPriv)); + tmp = g_new (AvahiClient, 1); + tmp->priv = g_new (AvahiClientPriv, 1); g_assert (tmp != NULL); g_assert (tmp->priv != NULL); @@ -163,7 +163,7 @@ avahi_client_get_string_reply_and_block (AvahiClient *client, char *method, char return NULL; } - dbus_message_get_args (reply, &error, DBUS_TYPE_STRING, &ret); + dbus_message_get_args (reply, &error, DBUS_TYPE_STRING, &ret, DBUS_TYPE_INVALID); if (dbus_error_is_set (&error)) {