]> git.meshlink.io Git - catta/commitdiff
* Fix a stupidity in avahi-client that stopped it from working.
authorTrent Lloyd <lathiat@bur.st>
Tue, 2 Aug 2005 20:38:45 +0000 (20:38 +0000)
committerTrent Lloyd <lathiat@bur.st>
Tue, 2 Aug 2005 20:38:45 +0000 (20:38 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@210 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-client/client.c

index 6ff099a662bb919d658a05348fe79eaba5372a1c..290d76748aabc93e551ac3f8d58671f663aebe6e 100644 (file)
@@ -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))
     {