--- cups-1.3.7/scheduler/conf.c.bpint 2010-06-22 15:51:27.000000000 +0100 +++ cups-1.3.7/scheduler/conf.c 2010-10-05 14:27:33.000000000 +0100 @@ -85,6 +85,7 @@ #endif /* __APPLE__ */ { "AutoPurgeJobs", &JobAutoPurge, CUPSD_VARTYPE_BOOLEAN }, { "BrowseInterval", &BrowseInterval, CUPSD_VARTYPE_INTEGER }, + { "BrowsePollInterval", &BrowsePollInterval, CUPSD_VARTYPE_INTEGER }, #ifdef HAVE_LDAP { "BrowseLDAPBindDN", &BrowseLDAPBindDN, CUPSD_VARTYPE_STRING }, { "BrowseLDAPCACertFile", &BrowseLDAPCACertFile, CUPSD_VARTYPE_PATHNAME }, @@ -558,6 +559,7 @@ NumSystemGroups = 0; BrowseInterval = DEFAULT_INTERVAL; + BrowsePollInterval = 0; BrowsePort = ippPort(); BrowseLocalProtocols = parse_protocols(CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS); BrowseRemoteProtocols = parse_protocols(CUPS_DEFAULT_BROWSE_REMOTE_PROTOCOLS); --- cups-1.3.7/scheduler/dirsvc.c.bpint 2010-06-22 15:51:27.000000000 +0100 +++ cups-1.3.7/scheduler/dirsvc.c 2010-10-05 14:27:03.000000000 +0100 @@ -820,6 +820,12 @@ max_count = 2 * cupsArrayCount(Printers) / BrowseInterval + 1; + /* Limit max count to 30, and set minimum to 15 ... */ + if (max_count > 30) + max_count = 30; + if (max_count < 15) + max_count = 15; + for (count = 0, p = (cupsd_printer_t *)cupsArrayFirst(Printers); count < max_count && p != NULL; p = (cupsd_printer_t *)cupsArrayNext(Printers)) @@ -1223,7 +1229,9 @@ sprintf(bport, "%d", BrowsePort); - if (BrowseInterval) + if (BrowsePollInterval) + sprintf(interval, "%d", BrowsePollInterval); + else if (BrowseInterval) sprintf(interval, "%d", BrowseInterval); else strcpy(interval, "30"); --- cups-1.3.7/scheduler/cups-polld.c.bpint 2010-06-22 15:51:27.000000000 +0100 +++ cups-1.3.7/scheduler/cups-polld.c 2010-10-05 15:22:41.000000000 +0100 @@ -328,6 +328,11 @@ count = 0; max_count = max_count / interval + 1; + /* Limit max count to 50, and set minimum to 30 ... */ + if (max_count > 50) + max_count = 50; + if (max_count < 30) + max_count = 30; /* * Loop through the printers or classes returned in the list... @@ -420,7 +425,7 @@ snprintf(packet, sizeof(packet), "%x %x %s \"%s\" \"%s\" \"%s\" lease-duration=%d%s\n", - type, state, uri, location, info, make_model, interval * 2, + type, state, uri, location, info, make_model, 60 * 60 * 8, job_sheets); fprintf(stderr, "DEBUG2: %s Sending %s", prefix, packet); --- cups-1.3.7/scheduler/dirsvc.h.bpint 2007-07-11 22:46:42.000000000 +0100 +++ cups-1.3.7/scheduler/dirsvc.h 2010-10-05 16:12:21.000000000 +0100 @@ -94,6 +94,8 @@ /* Port number for broadcasts */ BrowseInterval VALUE(DEFAULT_INTERVAL), /* Broadcast interval in seconds */ + BrowsePollInterval VALUE(0), + /* Interval for BrowsePoll, defaults to using BrowseInterval if not defined */ BrowseTimeout VALUE(DEFAULT_TIMEOUT), /* Time out for printers in seconds */ UseNetworkDefault VALUE(CUPS_DEFAULT_USE_NETWORK_DEFAULT), --- cups-1.3.7.saved3/man/cupsd.conf.man.in.bpint 2010-10-05 15:41:52.000000000 +0100 +++ cups-1.3.7.saved3/man/cupsd.conf.man.in 2010-10-05 16:20:50.000000000 +0100 @@ -138,6 +138,10 @@ .br Specifies the maximum interval between printer information broadcasts. .TP 5 +BrowsePollInterval seconds +.br +The interval used for polling servers by BrowsePoll. +.TP 5 BrowseOrder allow,deny .TP 5 BrowseOrder deny,allow --- cups-1.3.7.saved3/doc/help/ref-cupsd-conf.html.in.bpint 2010-10-05 16:14:10.000000000 +0100 +++ cups-1.3.7.saved3/doc/help/ref-cupsd-conf.html.in 2010-10-05 16:18:20.000000000 +0100 @@ -426,6 +426,22 @@ value. Otherwise printers and classes will disappear from client systems between updates.

+

BrowsePollInterval

+ +

Examples

+ +
+BrowsePollInterval 0
+BrowsePollInterval 300
+
+ +

Description

+ +

The BrowsePollInterval directive specifies the +time interval used by BrowsePoll to query remote servers.

+ +

If not specified then BrowseInterval is used (as was +done in previous versions).

CUPS 1.2BrowseLDAPBindDN

@@ -566,10 +582,13 @@

The BrowsePoll directive polls a server for available printers once every BrowseInterval seconds. +HREF="#BrowsePollInterval">BrowsePollInterval seconds. Multiple BrowsePoll directives can be specified to poll multiple servers.

+

If BrowsePollInterval is set to 0 then the value of +BrowseInterval is used.

+

If BrowseInterval is set to 0 then the server is polled once every 30 seconds.