]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
cups-browsed: Fix unset location check to use DNS-SD field 172/head
authortimor <timor.dd@googlemail.com>
Thu, 7 Nov 2019 19:24:59 +0000 (20:24 +0100)
committertimor <timor.dd@googlemail.com>
Thu, 7 Nov 2019 19:24:59 +0000 (20:24 +0100)
utils/cups-browsed.c

index da8ed402d4de9941495512cec30a26b0710797ff..adbf5002f0d8bb10fe1020cfcf855f9aeb52be1d 100644 (file)
@@ -9089,7 +9089,7 @@ examine_discovered_printer_record(const char *host,
     }
   }
   /* Extract location from DNS-SD TXT record's "note" field */
-  if (!location) {
+  if (location[0] == '\0') {
     if (txt) {
       entry = avahi_string_list_find((AvahiStringList *)txt, "note");
       if (entry) {
@@ -9103,8 +9103,6 @@ examine_discovered_printer_record(const char *host,
         /* don't avahi_free(note_value) here! */
       }
     }
-    if (!location)
-      location = "";
   }
   /* A NULL location is only passed in from resolve_callback(), which is
      HAVE_AVAHI */