Skip to content

Commit

Permalink
avahi: Fail immediately if we can't talk to D-Bus or Avahi
Browse files Browse the repository at this point in the history
We special-case AVAHI_ERR_NO_DAEMON to not cause warnings, but if
we pass AVAHI_CLIENT_NO_FAIL to avahi_client_new, we never actually
see AVAHI_ERR_NO_DAEMON. Instead, we will get AVAHI_ERR_BAD_STATE
when we try to use the client.

Closes: #1618
Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #1639
Approved by: cgwalters
  • Loading branch information
smcv authored and rh-atomic-bot committed Jun 23, 2018
1 parent 8d97b55 commit e120a6b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/libostree/ostree-repo-finder-avahi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1432,8 +1432,7 @@ ostree_repo_finder_avahi_start (OstreeRepoFinderAvahi *self,

g_assert (self->client == NULL);

client = avahi_client_new (avahi_glib_poll_get (self->poll),
AVAHI_CLIENT_NO_FAIL,
client = avahi_client_new (avahi_glib_poll_get (self->poll), 0,
client_cb, self, &failure);

if (client == NULL)
Expand Down

0 comments on commit e120a6b

Please sign in to comment.