]> git.meshlink.io Git - catta/blobdiff - avahi-core/browse.c
* rename all limit defs so that they end with _MAX
[catta] / avahi-core / browse.c
index 09bc0fa1f869b92aae244dc88b1dbac8b922f85b..5fd3a011b55f2f218ccdb3e7d11fe1dcbac1a4e5 100644 (file)
@@ -36,7 +36,7 @@
 #include "log.h"
 #include "querier.h"
 
-#define AVAHI_MAX_LOOKUPS_PER_BROWSER 15
+#define AVAHI_LOOKUPS_PER_BROWSER_MAX 15
 
 struct AvahiSRBLookup {
     AvahiSRecordBrowser *record_browser;
@@ -92,7 +92,7 @@ static AvahiSRBLookup* lookup_new(
     assert(AVAHI_IF_VALID(interface));
     assert(AVAHI_PROTO_VALID(protocol));
 
-    if (b->n_lookups >= AVAHI_MAX_LOOKUPS_PER_BROWSER)
+    if (b->n_lookups >= AVAHI_LOOKUPS_PER_BROWSER_MAX)
         /* We don't like cyclic CNAMEs */
         return NULL;
     
@@ -280,6 +280,9 @@ static void lookup_multicast_callback(
                 /* It's a normal record, so let's call the user callback */
                 assert(avahi_key_equal(b->key, l->key));
 
+                if (avahi_server_is_record_local(b->server, interface, protocol, r))
+                    flags |= AVAHI_LOOKUP_RESULT_LOCAL;
+                
                 b->callback(b, interface, protocol, event, r, flags, b->userdata);
             }
             break;