]> git.meshlink.io Git - catta/blobdiff - avahi-compat-howl/compat.c
fix logic of AVAHI_SERVER_REGISTERING state handling. Many clients assumed that
[catta] / avahi-compat-howl / compat.c
index 12f22fafb81815a56c024c4bdd5d1fcfc84aab1c..e4362081ca5a8740e0e1a9d3595493001ebcaa34 100644 (file)
@@ -380,7 +380,7 @@ sw_result sw_discovery_init(sw_discovery * self) {
 
     avahi_simple_poll_set_func((*self)->simple_poll, poll_func, *self);
 
-    if (!((*self)->client = avahi_client_new(avahi_simple_poll_get((*self)->simple_poll), client_callback, *self, &error))) {
+    if (!((*self)->client = avahi_client_new(avahi_simple_poll_get((*self)->simple_poll), 0, client_callback, *self, &error))) {
         result = map_error(error);
         goto fail;
     }
@@ -711,12 +711,13 @@ static void reg_client_callback(oid_data *data, AvahiClientState state) {
         }
             
         case AVAHI_CLIENT_S_COLLISION:
+        case AVAHI_CLIENT_S_REGISTERING:
 
             /* Remove our entry */
             avahi_entry_group_reset(data->object);
             break;
 
-        case AVAHI_CLIENT_S_REGISTERING:
+        case AVAHI_CLIENT_CONNECTING:
             /* Ignore */
             break;
     }