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");
}
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;
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);
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))
{