]> git.meshlink.io Git - catta/blobdiff - avahi-core/server.c
* fix local conflict detection algorithm
[catta] / avahi-core / server.c
index 6ba8ea0ce7cde7bb1a537a3d411db62526790f1f..235247a66bbf3b40c100e84ee4b49f62c7aa72d7 100644 (file)
@@ -1472,15 +1472,14 @@ static int check_record_conflict(AvahiServer *s, AvahiIfIndex interface, AvahiPr
         if ((flags & AVAHI_ENTRY_ALLOWMUTIPLE) && (e->flags & AVAHI_ENTRY_ALLOWMUTIPLE) )
             continue;
 
-        if (interface <= 0 ||
-            e->interface <= 0 ||
-            e->interface == interface ||
-            protocol == AVAHI_PROTO_UNSPEC ||
-            e->protocol == AVAHI_PROTO_UNSPEC ||
-            e->protocol == protocol)
+        if ((interface <= 0 ||
+             e->interface <= 0 ||
+             e->interface == interface) &&
+            (protocol == AVAHI_PROTO_UNSPEC ||
+             e->protocol == AVAHI_PROTO_UNSPEC ||
+             e->protocol == protocol))
 
             return -1;
-
     }
 
     return 0;