From b1134759e8d0ebf0007d7d89a1b6f098a906a48c Mon Sep 17 00:00:00 2001 From: mike Date: Wed, 16 May 2007 20:47:31 +0000 Subject: [PATCH] Treat Bonjour shared printers as (mostly) remote (STR #2384) scheduler/printers.c: - cupsdSetPrinterAttrs(): Look for APRemoteQueueID attribute as a sign that the printer is a shared Bonjour printer. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@6536 7a7537e8-13f0-0310-91df-b6672ffda945 --- CHANGES.txt | 12 ++++++++++-- scheduler/printers.c | 10 ++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 3985acf684..942cd4d307 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -5,6 +5,8 @@ CHANGES IN CUPS V1.3 - Documentation updates (STR #1775, STR #2130, STR #2131, STR #2263, STR #2356) + - The scheduler did not report Bonjour shared printers as + remote printers (STR #2384) - Added new -R and -W options to the cupstestppd program for greater control over the testing of PPDs. - Added a new cupsGetServerPPD() function for getting @@ -14,11 +16,17 @@ CHANGES IN CUPS V1.3 - Added a new CUPS_GET_PPD operation for getting an available PPD file on the server (STR #2334) - CUPS_GET_PPDS now reports multiple ppd-product values - if the corresponding PPD contains multiple products - (STR #2334) + based on the PPD ModelName and Product strings (STR + #2334, STR #2383) - CUPS_GET_PPDS now reports the PSVersion attributes from a PPD file in the ppd-psversion attribute (STR #2334) + - CUPS_GET_PPDS now reports the cupsModelNumber attribute + from a PPD file in the ppd-model-number attribute (STR + #2383) + - CUPS_GET_PPDS now reports a driver type string in the + ppd-type attribute based on the cupsFax and cupsFilter + attributes in a PPD file (STR #2383) - Added a new printer attribute called "cups-version" which reports the version of CUPS that is running (STR #2240) diff --git a/scheduler/printers.c b/scheduler/printers.c index ec83516f1e..2ce449f6c1 100644 --- a/scheduler/printers.c +++ b/scheduler/printers.c @@ -2180,10 +2180,20 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */ cupsdSetString(&p->product, ppd->product); #endif /* HAVE_DNSSD */ + if (ppdFindAttr(ppd, "APRemoteQueueID", NULL)) + { + /* + * This is a shared Bonjour printer... + */ + + p->type |= CUPS_PRINTER_REMOTE; + } + /* * Close the PPD and set the type... */ + ppdClose(ppd); printer_type = p->type; -- 2.47.2