]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Use the DNS-SD hostname when registering shared printers (Issue #5071)
authorMichael R Sweet <michaelrsweet@gmail.com>
Wed, 1 Nov 2017 20:20:56 +0000 (16:20 -0400)
committerMichael R Sweet <michaelrsweet@gmail.com>
Wed, 1 Nov 2017 20:20:56 +0000 (16:20 -0400)
CHANGES.md
scheduler/dirsvc.c
scheduler/dirsvc.h

index 0c4031dd1fdc1b30559e00452b80c2afc5c95e6e..065844416da77d0fb02d05412c94fbfbe0187d31 100644 (file)
@@ -11,6 +11,8 @@ Changes in CUPS v2.3b1
 - No longer support backslash, question mark, or quotes in printer names
   (Issue #4966)
 - Dropped RSS subscription management from the web interface (Issue #5012)
+- Bonjour printer sharing now uses the DNS-SD hostname (or ServerName value if
+  none is defined) when registering shared printers on the network (Issue #5071)
 - The `lp` and `lpr` commands now provide better error messages when the default
   printer cannot be found (Issue #5096)
 - The `lpadmin` command now provides a better error message when an unsupported
index 2308e05384bc90552a505590914ce876789b0c6c..dba2b7f598774bb0a28ed44b83c88e5b16acee22 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Directory services routines for the CUPS scheduler.
  *
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2017 by Apple Inc.
  * Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  * These coded instructions, statements, and computer programs are the
@@ -1075,7 +1075,7 @@ dnssdRegisterInstance(
 
   *srv  = DNSSDMaster;
   error = DNSServiceRegister(srv, kDNSServiceFlagsShareConnection,
-                            0, name, temp, NULL, NULL, htons(port),
+                            0, name, temp, NULL, DNSSDHostName, htons(port),
                             txt ? TXTRecordGetLength(txt) : 0,
                             txt ? TXTRecordGetBytesPtr(txt) : NULL,
                             dnssdRegisterCallback, p);
@@ -1090,7 +1090,7 @@ dnssdRegisterInstance(
 
   error = avahi_entry_group_add_service_strlst(*srv, AVAHI_IF_UNSPEC,
                                                AVAHI_PROTO_UNSPEC, 0, name,
-                                               type, NULL, NULL, port,
+                                               type, NULL, DNSSDHostName, port,
                                                txt ? *txt : NULL);
   if (error)
     cupsdLogMessage(CUPSD_LOG_DEBUG, "DNS-SD service add for \"%s\" failed.",
index 5b2d23e8f96ff014e62fa0fbab80e7f1128a7602..0cfcad9ea9a45f8150c4a17cdf1f284b81b74605 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Directory services definitions for the CUPS scheduler.
  *
- * Copyright 2007-2012 by Apple Inc.
+ * Copyright 2007-2017 by Apple Inc.
  * Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  * These coded instructions, statements, and computer programs are the