]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/dirsvc.c
Merge changes from CUPS 1.5svn-r9717.
[thirdparty/cups.git] / scheduler / dirsvc.c
index 4ce0837866c64b2691ab5cce9f08f29debd78602..ca3c9cd8f31705e4392f1f2902456924e0f5e54c 100644 (file)
@@ -1594,16 +1594,8 @@ cupsdStartBrowsing(void)
        if (httpAddrLocalhost(&(lis->address)))
          continue;
 
-       if (lis->address.addr.sa_family == AF_INET)
-       {
-         DNSSDPort = ntohs(lis->address.ipv4.sin_port);
-         break;
-       }
-       else if (lis->address.addr.sa_family == AF_INET6)
-       {
-         DNSSDPort = ntohs(lis->address.ipv6.sin6_port);
-         break;
-       }
+        DNSSDPort = _httpAddrPort(&(lis->address));
+       break;
       }
 
      /*
@@ -2361,7 +2353,7 @@ dnssdBuildTxtRecord(
   int          i;                      /* Looping var */
   char         admin_hostname[256],    /* .local hostname for admin page */
                adminurl_str[256],      /* URL for the admin page */
-               type_str[32],           /* Type to string buffer */
+               type_str[32],           /* Type to string buffer */
                state_str[32],          /* State to string buffer */
                rp_str[1024],           /* Queue name string buffer */
                air_str[1024],          /* auth-info-required string buffer */
@@ -2759,11 +2751,10 @@ dnssdRegisterPrinter(cupsd_printer_t *p)/* I - Printer */
   if (!p->ipp_ref)
   {
    /*
-    * Initial registration.  Use the _fax subtype for fax queues...
+    * Initial registration.  Use the _fax-ipp regtype for fax queues...
     */
 
-    regtype = (p->type & CUPS_PRINTER_FAX) ? "_fax-ipp._tcp" :
-                                             "_ipp._tcp,_cups";
+    regtype = (p->type & CUPS_PRINTER_FAX) ? "_fax-ipp._tcp" : DNSSDRegType;
 
     cupsdLogMessage(CUPSD_LOG_DEBUG, 
                    "Registering DNS-SD printer %s with name \"%s\" and "