/*
- * "$Id: dirsvc.c 7003 2007-10-01 23:10:13Z mike $"
+ * "$Id: dirsvc.c 7676 2008-06-18 23:42:37Z mike $"
*
* Directory services routines for the Common UNIX Printing System (CUPS).
*
* cupsdStopBrowsing() - Stop sending and receiving broadcast
* information.
* cupsdStopPolling() - Stop polling servers as needed.
- * cupsdUpdateDNSSDBrowse() - Handle DNS-SD queries.
* cupsdUpdateDNSSDName() - Update the computer name we use for
* browsing...
* cupsdUpdateLDAPBrowse() - Scan for new printers via LDAP...
* dnssdRegisterCallback() - DNSServiceRegister callback.
* dnssdRegisterPrinter() - Start sending broadcast information for a
* printer or update the broadcast contents.
+ * dnssdUpdate() - Handle DNS-SD queries.
* get_hostconfig() - Get an /etc/hostconfig service setting.
* is_local_queue() - Determine whether the URI points at a local
* queue.
const char *name, const char *regtype,
const char *domain, void *context);
static void dnssdRegisterPrinter(cupsd_printer_t *p);
+static void dnssdUpdate(void);
#endif /* HAVE_DNSSD */
#ifdef HAVE_OPENLDAP
*/
cupsdAddSelect(DNSServiceRefSockFD(DNSSDRef),
- (cupsd_selfunc_t)cupsdUpdateDNSSDBrowse, NULL, NULL);
+ (cupsd_selfunc_t)dnssdUpdate, NULL, NULL);
/*
* Then get the port we use for registrations. If we are not listening
#ifdef HAVE_DNSSD
-/*
- * 'cupsdUpdateDNSSDBrowse()' - Handle DNS-SD queries.
- */
-
-void
-cupsdUpdateDNSSDBrowse(void)
-{
- DNSServiceErrorType sdErr; /* Service discovery error */
-
-
- if ((sdErr = DNSServiceProcessResult(DNSSDRef)) != kDNSServiceErr_NoError)
- cupsdLogMessage(CUPSD_LOG_ERROR,
- "DNS Service Discovery registration error %d!",
- sdErr);
-}
-
-
/*
* 'cupsdUpdateDNSSDName()' - Update the computer name we use for browsing...
*/
free(printer_txt);
}
}
+
+
+/*
+ * 'dnssdUpdate()' - Handle DNS-SD queries.
+ */
+
+static void
+dnssdUpdate(void)
+{
+ DNSServiceErrorType sdErr; /* Service discovery error */
+
+
+ if ((sdErr = DNSServiceProcessResult(DNSSDRef)) != kDNSServiceErr_NoError)
+ cupsdLogMessage(CUPSD_LOG_ERROR,
+ "DNS Service Discovery registration error %d!",
+ sdErr);
+}
#endif /* HAVE_DNSSD */
NULL
};
- cupsdLogMessage(CUPSD_LOG_DEBUG2, "send_ldap_browse: %s\n", p->name);
+ cupsdLogMessage(CUPSD_LOG_DEBUG2, "send_ldap_browse: %s", p->name);
/*
* Everything in ldap is ** so we fudge around it...
/*
- * End of "$Id: dirsvc.c 7003 2007-10-01 23:10:13Z mike $".
+ * End of "$Id: dirsvc.c 7676 2008-06-18 23:42:37Z mike $".
*/