From 0571dc2e99dee3051632548f2e979db6b37fb650 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 21 Aug 2005 15:20:55 +0000 Subject: * fix local conflict detection algorithm git-svn-id: file:///home/lennart/svn/public/avahi/trunk@382 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-core/server.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/avahi-core/server.c b/avahi-core/server.c index 6ba8ea0..235247a 100644 --- a/avahi-core/server.c +++ b/avahi-core/server.c @@ -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; -- cgit