From 9106e01368e38ad4b0f8b423f08b2ea80443ac1f Mon Sep 17 00:00:00 2001 From: timor Date: Thu, 7 Nov 2019 20:24:59 +0100 Subject: [PATCH] cups-browsed: Fix unset location check to use DNS-SD field --- utils/cups-browsed.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c index da8ed402d..adbf5002f 100644 --- a/utils/cups-browsed.c +++ b/utils/cups-browsed.c @@ -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 */ -- 2.47.2