]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Add BrowseIPPSOnly boolean directive and update man page
authorabubakarsabir924-cell <abubakarsabir924@gmail.com>
Fri, 1 May 2026 01:32:18 +0000 (06:32 +0500)
committerabubakarsabir924-cell <abubakarsabir924@gmail.com>
Fri, 1 May 2026 15:39:46 +0000 (20:39 +0500)
man/cupsd.conf.5
scheduler/conf.c
scheduler/conf.h
scheduler/dirsvc.c

index 1a3a32515ac0c7effa85d367ee28cee55cceb1d5..94f7d2e32b02fce1c2b74df70c2e4d09942f6d2d 100644 (file)
@@ -68,6 +68,14 @@ The default is "dnssd" on systems that support DNS-SD and "none" otherwise.
 .br
 Specifies whether the CUPS web interface is advertised.
 The default is "No".
+.\"#BrowseIPPSOnly
+.TP 5
+\fBBrowseIPPSOnly Yes\fR
+.TP 5
+\fBBrowseIPPSOnly No\fR
+.br
+Specifies whether to only advertise IPPS services.
+The default is "No".
 .\"#Browsing
 .TP 5
 \fBBrowsing Yes\fR
index 2e4ea8254f4d6343a706c5c175474e0c95b91c8f..5d3bbc44734ece118584897748c6e7e0487fecb2 100644 (file)
@@ -68,6 +68,7 @@ static const cupsd_var_t      cupsd_vars[] =
 {
   { "AutoPurgeJobs",           &JobAutoPurge,          CUPSD_VARTYPE_BOOLEAN },
   { "BrowseDNSSDSubTypes",     &DNSSDSubTypes,         CUPSD_VARTYPE_NULLSTRING },
+  { "BrowseIPPSOnly",  &BrowseIPPSOnly,        CUPSD_VARTYPE_BOOLEAN },
   { "BrowseWebIF",             &BrowseWebIF,           CUPSD_VARTYPE_BOOLEAN },
   { "Browsing",                        &Browsing,              CUPSD_VARTYPE_BOOLEAN },
   { "Classification",          &Classification,        CUPSD_VARTYPE_STRING },
index 553d1f95563068129777365d795108eeb2774081..c17c77ead4649e1dfbbfbf8f6a62bbbc622da7ac 100644 (file)
@@ -225,6 +225,8 @@ VAR int                     FilterLimit             VALUE(0),
                                        /* multiple-operation-time-out value */
                        WebInterface            VALUE(CUPS_DEFAULT_WEBIF);
                                        /* Enable the web interface? */
+VAR int                        BrowseIPPSOnly          VALUE(0);
+                                       /* Only browse IPPS printers? */
 VAR cups_file_t                *AccessFile             VALUE(NULL),
                                        /* Access log file */
                        *ErrorFile              VALUE(NULL),
index 0dbc1d050fb90c2d8ec853d1876ad54e798f2a7e..823b6e779922e2d80b4e4f99e112a4c3a963d744 100644 (file)
@@ -43,7 +43,7 @@ cupsdDeregisterPrinter(
     int             removeit)          /* I - Printer being permanently removed */
 {
  /*
-  * Only deregister if browsing is enabled and it's a local printer...
+
   */
 
   cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdDeregisterPrinter(p=%p(%s), removeit=%d)", (void *)p, p->name, removeit);
@@ -477,7 +477,9 @@ dnssdRegisterPrinter(
 
   if (!p->shared)
     return;
-
+  
+if (BrowseIPPSOnly && !(p->type & CUPS_PTYPE_REMOTE))
+    return;
  /*
   * Set the registered name as needed; the registered name takes the form of
   * "<printer-info> @ <computer name>"...