summaryrefslogtreecommitdiffstats
path: root/avahi-compat-libdns_sd
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-11-08 21:56:28 +0000
committerLennart Poettering <lennart@poettering.net>2005-11-08 21:56:28 +0000
commit6ecd227ceadc32ed229246aa61df6361c7b58a95 (patch)
tree95a9f35ccc096839faba3aa22afe07e9743d18a3 /avahi-compat-libdns_sd
parent0d787cfca3b6e2c0755a54ca732a85e15756aa57 (diff)
* add new flags parameter to avahi_client_new()
* introduce flags AVAHI_CLIENT_NO_FAIL and AVAHI_CLIENT_IGNORE_USER_CONFIG * beef up avahi-browse to show how AVAHI_CLIENT_NO_FAIL may be used: add a new parameter "-f" which tells avahi-browse to stay running when the daemon disconnects from DBUS and reconnect when it reappears. For now dbus-daemon restarts are not handled and result in an AVAHI_CLIENT_FAIL event. git-svn-id: file:///home/lennart/svn/public/avahi/trunk@937 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-compat-libdns_sd')
-rw-r--r--avahi-compat-libdns_sd/compat.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/avahi-compat-libdns_sd/compat.c b/avahi-compat-libdns_sd/compat.c
index 432bb38..ae1cfb2 100644
--- a/avahi-compat-libdns_sd/compat.c
+++ b/avahi-compat-libdns_sd/compat.c
@@ -494,6 +494,7 @@ static void generic_client_callback(AvahiClient *s, AvahiClientState state, void
case AVAHI_CLIENT_S_RUNNING:
case AVAHI_CLIENT_S_COLLISION:
case AVAHI_CLIENT_S_REGISTERING:
+ case AVAHI_CLIENT_CONNECTING:
break;
}
}
@@ -532,7 +533,7 @@ DNSServiceErrorType DNSSD_API DNSServiceBrowse(
ASSERT_SUCCESS(pthread_mutex_lock(&sdref->mutex));
- if (!(sdref->client = avahi_client_new(avahi_simple_poll_get(sdref->simple_poll), generic_client_callback, sdref, &error))) {
+ if (!(sdref->client = avahi_client_new(avahi_simple_poll_get(sdref->simple_poll), 0, generic_client_callback, sdref, &error))) {
ret = map_error(error);
goto finish;
}
@@ -645,7 +646,7 @@ DNSServiceErrorType DNSSD_API DNSServiceResolve(
ASSERT_SUCCESS(pthread_mutex_lock(&sdref->mutex));
- if (!(sdref->client = avahi_client_new(avahi_simple_poll_get(sdref->simple_poll), generic_client_callback, sdref, &error))) {
+ if (!(sdref->client = avahi_client_new(avahi_simple_poll_get(sdref->simple_poll), 0, generic_client_callback, sdref, &error))) {
ret = map_error(error);
goto finish;
}
@@ -757,7 +758,7 @@ DNSServiceErrorType DNSSD_API DNSServiceEnumerateDomains(
ASSERT_SUCCESS(pthread_mutex_lock(&sdref->mutex));
- if (!(sdref->client = avahi_client_new(avahi_simple_poll_get(sdref->simple_poll), generic_client_callback, sdref, &error))) {
+ if (!(sdref->client = avahi_client_new(avahi_simple_poll_get(sdref->simple_poll), 0, generic_client_callback, sdref, &error))) {
ret = map_error(error);
goto finish;
}
@@ -902,6 +903,7 @@ static void reg_client_callback(AvahiClient *s, AvahiClientState state, void* us
break;
+ case AVAHI_CLIENT_CONNECTING:
case AVAHI_CLIENT_S_REGISTERING:
/* Ignore */
break;
@@ -1014,7 +1016,7 @@ DNSServiceErrorType DNSSD_API DNSServiceRegister (
ASSERT_SUCCESS(pthread_mutex_lock(&sdref->mutex));
- if (!(sdref->client = avahi_client_new(avahi_simple_poll_get(sdref->simple_poll), reg_client_callback, sdref, &error))) {
+ if (!(sdref->client = avahi_client_new(avahi_simple_poll_get(sdref->simple_poll), 0, reg_client_callback, sdref, &error))) {
ret = map_error(error);
goto finish;
}