dbus_error_init (&error);
- if (client->state == AVAHI_CLIENT_FAILURE) {
+ if (!avahi_client_is_connected(client)) {
avahi_client_set_errno(client, AVAHI_ERR_BAD_STATE);
goto fail;
}
assert(group);
- if (group->path && client->state != AVAHI_CLIENT_FAILURE)
+ if (group->path && avahi_client_is_connected(client))
r = entry_group_simple_method_call(group, "Free");
AVAHI_LLIST_REMOVE(AvahiEntryGroup, groups, client->groups, group);
int avahi_entry_group_commit(AvahiEntryGroup *group) {
assert(group);
- if (!group->path || group->client->state == AVAHI_CLIENT_FAILURE)
+ if (!group->path || !avahi_client_is_connected(group->client))
return avahi_client_set_errno(group->client, AVAHI_ERR_BAD_STATE);
return entry_group_simple_method_call(group, "Commit");
int avahi_entry_group_reset(AvahiEntryGroup *group) {
assert(group);
- if (!group->path || group->client->state == AVAHI_CLIENT_FAILURE)
+ if (!group->path || !avahi_client_is_connected(group->client))
return avahi_client_set_errno(group->client, AVAHI_ERR_BAD_STATE);
return entry_group_simple_method_call(group, "Reset");
assert(group);
client = group->client;
- if (!group->path || group->client->state == AVAHI_CLIENT_FAILURE)
+ if (!group->path || !avahi_client_is_connected(group->client))
return avahi_client_set_errno(group->client, AVAHI_ERR_BAD_STATE);
dbus_error_init(&error);
client = group->client;
- if (!group->path || group->client->state == AVAHI_CLIENT_FAILURE)
+ if (!group->path || !avahi_client_is_connected(group->client))
return avahi_client_set_errno(group->client, AVAHI_ERR_BAD_STATE);
if (!domain)
client = group->client;
- if (!group->path || group->client->state == AVAHI_CLIENT_FAILURE)
+ if (!group->path || !avahi_client_is_connected(group->client))
return avahi_client_set_errno(group->client, AVAHI_ERR_BAD_STATE);
if (!domain)
client = group->client;
- if (!group->path || group->client->state == AVAHI_CLIENT_FAILURE)
+ if (!group->path || !avahi_client_is_connected(group->client))
return avahi_client_set_errno(group->client, AVAHI_ERR_BAD_STATE);
if (!domain)
dbus_message_unref(reply);
return r;
-
-
}
/** Add a host/address pair */
client = group->client;
- if (!group->path || group->client->state == AVAHI_CLIENT_FAILURE)
+ if (!group->path || !avahi_client_is_connected(group->client))
return avahi_client_set_errno(group->client, AVAHI_ERR_BAD_STATE);
dbus_error_init(&error);
client = group->client;
- if (!group->path || group->client->state == AVAHI_CLIENT_FAILURE)
+ if (!group->path || !avahi_client_is_connected(group->client))
return avahi_client_set_errno(group->client, AVAHI_ERR_BAD_STATE);
dbus_error_init(&error);