]> git.meshlink.io Git - catta/commitdiff
* fix local conflict detection algorithm
authorLennart Poettering <lennart@poettering.net>
Sun, 21 Aug 2005 15:20:55 +0000 (15:20 +0000)
committerLennart Poettering <lennart@poettering.net>
Sun, 21 Aug 2005 15:20:55 +0000 (15:20 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@382 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

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;