Skip to content

Commit 3a81e14

Browse files
Add BrowseIPPSOnly boolean directive and update man page
1 parent de1dfc4 commit 3a81e14

4 files changed

Lines changed: 15 additions & 2 deletions

File tree

man/cupsd.conf.5

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ The default is "dnssd" on systems that support DNS-SD and "none" otherwise.
6868
.br
6969
Specifies whether the CUPS web interface is advertised.
7070
The default is "No".
71+
.\"#BrowseIPPSOnly
72+
.TP 5
73+
\fBBrowseIPPSOnly Yes\fR
74+
.TP 5
75+
\fBBrowseIPPSOnly No\fR
76+
.br
77+
Specifies whether to only advertise IPPS services.
78+
The default is "No".
7179
.\"#Browsing
7280
.TP 5
7381
\fBBrowsing Yes\fR

scheduler/conf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ static const cupsd_var_t cupsd_vars[] =
6868
{
6969
{ "AutoPurgeJobs", &JobAutoPurge, CUPSD_VARTYPE_BOOLEAN },
7070
{ "BrowseDNSSDSubTypes", &DNSSDSubTypes, CUPSD_VARTYPE_NULLSTRING },
71+
{ "BrowseIPPSOnly", &BrowseIPPSOnly, CUPSD_VARTYPE_BOOLEAN },
7172
{ "BrowseWebIF", &BrowseWebIF, CUPSD_VARTYPE_BOOLEAN },
7273
{ "Browsing", &Browsing, CUPSD_VARTYPE_BOOLEAN },
7374
{ "Classification", &Classification, CUPSD_VARTYPE_STRING },

scheduler/conf.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ VAR int FilterLimit VALUE(0),
225225
/* multiple-operation-time-out value */
226226
WebInterface VALUE(CUPS_DEFAULT_WEBIF);
227227
/* Enable the web interface? */
228+
VAR int BrowseIPPSOnly VALUE(0);
229+
/* Only browse IPPS printers? */
228230
VAR cups_file_t *AccessFile VALUE(NULL),
229231
/* Access log file */
230232
*ErrorFile VALUE(NULL),

scheduler/dirsvc.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ cupsdDeregisterPrinter(
4343
int removeit) /* I - Printer being permanently removed */
4444
{
4545
/*
46-
* Only deregister if browsing is enabled and it's a local printer...
46+
4747
*/
4848

4949
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdDeregisterPrinter(p=%p(%s), removeit=%d)", (void *)p, p->name, removeit);
@@ -477,7 +477,9 @@ dnssdRegisterPrinter(
477477

478478
if (!p->shared)
479479
return;
480-
480+
481+
if (BrowseIPPSOnly && !(p->type & CUPS_PTYPE_REMOTE))
482+
return;
481483
/*
482484
* Set the registered name as needed; the registered name takes the form of
483485
* "<printer-info> @ <computer name>"...

0 commit comments

Comments
 (0)