CXXFLAGS="$CXXFLAGS -DDEBUG_GUARDS"
fi
+# =========================================================
+# Turn on/off network interface updates for each found entry
+# ==========================================================
+AC_ARG_ENABLE([frequent_netif_update],
+ [AS_HELP_STRING([--enable-frequent-netif-update], [Enable network interface update after each found entry to prevent network issues])],
+ [FREQUENT_NETIF_UPDATE=$enableval],
+ [FREQUENT_NETIF_UPDATE=yes]
+)
+
+AS_IF([test "x$FREQUENT_NETIF_UPDATE" != "xno"],
+ [AC_DEFINE([FREQUENT_NETIF_UPDATE], [1], [Define whether we want network interface update after each found entry])]
+)
+
# =====================
# Prepare all .in files
# =====================
ppdc utilities: ${enable_ppdc_utils}
local queue naming for remote CUPS queues: ${REMOTE_CUPS_LOCAL_QUEUE_NAMING}
keep generated queues during shutdown: ${SAVING_CREATED_QUEUES}
+ update network interfaces after each found entry: ${FREQUENT_NETIF_UPDATE}
all ipp printer auto-setup: ${enable_auto_setup_all}
only driverless auto-setup: ${enable_auto_setup_driverless_only}
only local auto-setup: ${enable_auto_setup_local_only}
static guint autoshutdown_exec_id = 0;
static const char *default_printer = NULL;
static unsigned int notify_lease_duration = 86400;
+#ifdef FREQUENT_NETIF_UPDATE
+static int FrequentNetifUpdate = 1;
+#else
+static int FrequentNetifUpdate = 0;
+#endif
static int debug_stderr = 0;
static int debug_logfile = 0;
or legacy CUPS, needed for the is_local_hostname() function calls.
During DNS-SD discovery the update is already done by the Avahi
event handler function. */
- if (type == NULL || type[0] == '\0')
+ if (FrequentNetifUpdate && (type == NULL || type[0] == '\0'))
update_netifs(NULL);
/* Check if we have already created a queue for the discovered
via UUID */
pthread_rwlock_wrlock(&resolvelock);
- update_netifs(NULL);
+ if (FrequentNetifUpdate)
+ update_netifs(NULL);
if ((flags & AVAHI_LOOKUP_RESULT_LOCAL) || !strcasecmp(ifname, "lo") ||
is_local_hostname(host_name)) {
else if (!strcasecmp(value, "no") || !strcasecmp(value, "false") ||
!strcasecmp(value, "off") || !strcasecmp(value, "0"))
AutoClustering = 0;
+ } else if (!strcasecmp(line, "FrequentNetifUpdate") && value) {
+ if (!strcasecmp(value, "yes") || !strcasecmp(value, "true") ||
+ !strcasecmp(value, "on") || !strcasecmp(value, "1"))
+ FrequentNetifUpdate = 1;
+ else if (!strcasecmp(value, "no") || !strcasecmp(value, "false") ||
+ !strcasecmp(value, "off") || !strcasecmp(value, "0"))
+ FrequentNetifUpdate = 0;
} else if (!strcasecmp(line, "Cluster") && value) {
ptr = value;
ptr2 = NULL;
NotifLeaseDuration 86400
.fam T
.fi
+FrequentNetifUpdate turns on/off the network interface update routines
+which happen for each found entry, which can slow up cups-browsed significantly
+if we are on a network with many shared printers or if we use BrowsePoll to a server
+with many queues. Network interface updates after receiving D-BUS notification
+from NetworkManager won't be turned off with the directive. The default value
+is 'Yes'.
+.PP
+.nf
+.fam C
+ FrequentNetifUpdate Yes
+.fam T
+.fi
.SH SEE ALSO
\fBcups-browsed\fP(8)
# and doing specific actions when a D-BUS notification comes.
# NotifLeaseDuration 86400
+
+# FrequentNetifUpdate turns on/off the network interface update routines
+# which happen for each found entry, which can slow up cups-browsed significantly
+# if we are on a network with many shared printers or if we use BrowsePoll to a server
+# with many queues. Network interface updates after receiving D-BUS notification
+# from NetworkManager won't be turned off with the directive. The default value
+# is 'Yes'.
+#
+# FrequentNetifUpdate Yes