[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#794655: cups-browsed: please make the browse interval to be configurable



Package: cups-browsed
Version: 1.0.71-1
Severity: wishlist
Tags: patch

Hi,

In cups < 1.6 the BrowseInterval used to be configurable, but in
cups-browsed this is now hardcoded to 60 seconds. Attached is a patch
that should allow it to be configurable again - soon I will send
another patch for which it makes more sense to allow the
BrowseInterval to be configurable.

Cheers,
-- 
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net
Index: cups-filters-1.0.71-1/utils/cups-browsed.c
===================================================================
--- cups-filters-1.0.71-1/utils/cups-browsed.c
+++ cups-filters-1.0.71-1/utils/cups-browsed.c
@@ -3118,8 +3118,17 @@
     } else if (!strcasecmp(line, "BrowseAllow")) {
       if (read_browseallow_value (value))
 	debug_printf ("cups-browsed: BrowseAllow value \"%s\" not understood\n",
 		      value);
+    } else if (!strcasecmp(line, "BrowseInterval") && value) {
+      int t = atoi(value);
+      if (t >= 0) {
+	BrowseInterval = t;
+	debug_printf("cups-browsed: Set browsing interval to %d sec.\n",
+		     t);
+      } else
+	debug_printf("cups-browsed: Invalid browsing interval value: %d\n",
+		     t);
     } else if (!strcasecmp(line, "DomainSocket") && value) {
       if (value[0] != '\0')
 	DomainSocket = strdup(value);
     } else if (!strcasecmp(line, "CreateIPPPrinterQueues") && value) {

Reply to: