From aa19fa3f21d9f00150e188c3cb84b39965c23367 Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Wed, 15 Jul 2020 18:57:47 +0200 Subject: [PATCH] cups-browsed: Do not write any log messages directly to stderr --- NEWS | 3 +++ utils/cups-browsed.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 9514f9732..d93006127 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,9 @@ NEWS - OpenPrinting CUPS Filters v1.27.5 - 2020-06-05 CHANGES IN V1.28.0 + - cups-browsed: Do not write any log messages directly to + stderr, there were some concerning timeouts on queue + creation (Issue #260). - Build system: Fix cross-compilation without DejaVu test font in configure.ac (Issue #262, Pull request #263). - libcupsfilters, libppd: Respect the fact that PPD keywords diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c index 0e3a0bb0c..74d32bc32 100644 --- a/utils/cups-browsed.c +++ b/utils/cups-browsed.c @@ -7782,7 +7782,7 @@ gboolean update_cups_queues(gpointer unused) { /* cups-browsed tried to add this print queue unsuccessfully for too many times due to timeouts - Skip print queue creation for this one */ if (p->timeouted >= HttpMaxRetries) { - fprintf(stderr, "Max number of retries (%d) for creating print queue %s reached, skipping it.\n", + debug_printf("Max number of retries (%d) for creating print queue %s reached, skipping it.\n", HttpMaxRetries, p->queue_name); continue; } @@ -8708,7 +8708,8 @@ gboolean update_cups_queues(gpointer unused) { to STATUS_CONFIRMED and experience the timeout */ /* If no timeout has happened, clear p->timeouted */ if (timeout_reached == 1) { - fprintf(stderr, "Timeout happened during creation of the queue %s, turn on DebugLogging for more info.\n", p->queue_name); + debug_printf("Timeout happened during creation of the queue %s.\n", + p->queue_name); p->timeouted ++; debug_printf("The queue %s already timeouted %d times in a row.\n", p->queue_name, p->timeouted); -- 2.47.3