diff options
author | Simon McVittie <smcv@debian.org> | 2018-06-22 01:10:55 +0100 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-06-23 14:54:39 +0000 |
commit | e120a6b1198aaa785533c76316898f15a804dae1 (patch) | |
tree | 3dc18818133eb9d190604b1d7d12d865bacd01c2 /src | |
parent | 8d97b552412de0baa109255c9d8e3bca04ed27ff (diff) | |
download | ostree-e120a6b1198aaa785533c76316898f15a804dae1.tar.gz |
avahi: Fail immediately if we can't talk to D-Bus or Avahi
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
Diffstat (limited to 'src')
-rw-r--r-- | src/libostree/ostree-repo-finder-avahi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libostree/ostree-repo-finder-avahi.c b/src/libostree/ostree-repo-finder-avahi.c index 223d8f0a..bc383769 100644 --- a/src/libostree/ostree-repo-finder-avahi.c +++ b/src/libostree/ostree-repo-finder-avahi.c @@ -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) |