summaryrefslogtreecommitdiff
path: root/scheduler/dirsvc.c
diff options
context:
space:
mode:
authorMichael R Sweet <michaelrsweet@gmail.com>2017-11-01 16:20:56 -0400
committerMichael R Sweet <michaelrsweet@gmail.com>2017-11-01 16:20:56 -0400
commitc5d2b23327fa78c4e4cf90b82ece232e0e7f4167 (patch)
treef77881d88f390296f6db79476b8ce3b8ce401347 /scheduler/dirsvc.c
parent47386fc10674d23fa6a7c83cffe7146c0c50cbbc (diff)
downloadcups-c5d2b23327fa78c4e4cf90b82ece232e0e7f4167.tar.gz
Use the DNS-SD hostname when registering shared printers (Issue #5071)
Diffstat (limited to 'scheduler/dirsvc.c')
-rw-r--r--scheduler/dirsvc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/scheduler/dirsvc.c b/scheduler/dirsvc.c
index 2308e0538..dba2b7f59 100644
--- a/scheduler/dirsvc.c
+++ b/scheduler/dirsvc.c
@@ -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.",