]> git.meshlink.io Git - catta/blobdiff - avahi-compat-libdns_sd/compat.c
add new client state AVAHI_CLIENT_FAILURE
[catta] / avahi-compat-libdns_sd / compat.c
index 6a1b30d744c39cae8fb787a3cba3438ceace6714..6fec3c96b40ee8bcfbc406bf478426f5af5d83cc 100644 (file)
@@ -33,6 +33,9 @@
 #include <netinet/in.h>
 #include <fcntl.h>
 
+#include <sys/types.h>
+#include <sys/socket.h>
+
 #include <avahi-common/simple-watch.h>
 #include <avahi-common/malloc.h>
 #include <avahi-common/error.h>
@@ -476,7 +479,8 @@ static void generic_client_callback(AvahiClient *s, AvahiClientState state, void
     assert(sdref->n_ref >= 1);
 
     switch (state) {
-            
+
+        case AVAHI_CLIENT_FAILURE:
         case AVAHI_CLIENT_DISCONNECTED:
 
             if (sdref->service_browser_callback)
@@ -857,6 +861,7 @@ static void reg_client_callback(AvahiClient *s, AvahiClientState state, void* us
         return;
     
     switch (state) {
+        case AVAHI_CLIENT_FAILURE:
         case AVAHI_CLIENT_DISCONNECTED:
             reg_report_error(sdref, kDNSServiceErr_Unknown);
             break;