From: mike Date: Wed, 23 May 2007 15:08:29 +0000 (+0000) Subject: Don't tag CUPS Bonjour printers as remote by default, to work around a X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d40c8897331f01185eb2ae003c8dd2b0f672857c;p=thirdparty%2Fcups.git Don't tag CUPS Bonjour printers as remote by default, to work around a bug in the Mac OS X print dialog. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@6539 7a7537e8-13f0-0310-91df-b6672ffda945 --- diff --git a/scheduler/printers.c b/scheduler/printers.c index af1909b5d4..ad0d71d7b3 100644 --- a/scheduler/printers.c +++ b/scheduler/printers.c @@ -66,6 +66,19 @@ #include +/* + * Currently Bonjour printers that are shared by CUPS servers are added + * manually by the user on Mac OS X systems. While these printers *are* + * remote queues, the current print dialog will not show them if they + * (correctly) have the CUPS_PRINTER_REMOTE bit set. This may change + * in future releases, however the code to do this is currently disabled. + * + * Define BONJOUR_IS_REMOTE to 1 to get the correct behavior... + */ + +#define BONJOUR_IS_REMOTE 0 + + /* * Local functions... */ @@ -2180,7 +2193,9 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */ cupsdSetString(&p->product, ppd->product); #endif /* HAVE_DNSSD */ +#if BONJOUR_IS_REMOTE ppdattr = ppdFindAttr(ppd, "APRemoteQueueID", NULL); +#endif /* BONJOUR_IS_REMOTE */ /* * Close the PPD and set the type... @@ -2190,6 +2205,7 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */ printer_type = p->type; +#if BONJOUR_IS_REMOTE if (ppdattr) { /* @@ -2198,6 +2214,7 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */ printer_type |= CUPS_PRINTER_REMOTE; } +#endif /* BONJOUR_IS_REMOTE */ } else if (!access(filename, 0)) {