diff --git a/cups-avahi-browse.patch b/cups-avahi-browse.patch new file mode 100644 index 0000000..24c05fc --- /dev/null +++ b/cups-avahi-browse.patch @@ -0,0 +1,46 @@ +diff -up cups-1.7.1/backend/dnssd.c.avahi-browse cups-1.7.1/backend/dnssd.c +--- cups-1.7.1/backend/dnssd.c.avahi-browse 2012-12-12 20:54:21.000000000 +0000 ++++ cups-1.7.1/backend/dnssd.c 2014-02-11 12:44:54.785319324 +0000 +@@ -95,6 +95,7 @@ static int job_canceled = 0; + static AvahiSimplePoll *simple_poll = NULL; + /* Poll information */ + static int got_data = 0; /* Got data from poll? */ ++static int browsers = 0; /* Number of running browsers */ + #endif /* HAVE_AVAHI */ + + +@@ -345,6 +346,7 @@ main(int argc, /* I - Number of comm + return (1); + } + ++ browsers = 6; + avahi_service_browser_new(client, AVAHI_IF_UNSPEC, + AVAHI_PROTO_UNSPEC, + "_fax-ipp._tcp", NULL, 0, +@@ -559,7 +561,11 @@ main(int argc, /* I - Number of comm + fprintf(stderr, "DEBUG: sent=%d, count=%d\n", sent, count); + + if (sent == cupsArrayCount(devices)) +- break; ++#ifdef HAVE_AVAHI ++ if (browsers == 0) ++ /* All service browsers have finished */ ++#endif /* HAVE_AVAHI */ ++ break; + } + } + +@@ -710,9 +716,12 @@ browse_callback( + break; + + case AVAHI_BROWSER_REMOVE: +- case AVAHI_BROWSER_ALL_FOR_NOW: + case AVAHI_BROWSER_CACHE_EXHAUSTED: + break; ++ ++ case AVAHI_BROWSER_ALL_FOR_NOW: ++ browsers--; ++ break; + } + } + diff --git a/cups.spec b/cups.spec index 93a6525..f3356c2 100644 --- a/cups.spec +++ b/cups.spec @@ -11,7 +11,7 @@ Summary: CUPS printing system Name: cups Epoch: 1 Version: 1.7.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Daemons Url: http://www.cups.org/ @@ -67,6 +67,7 @@ Patch39: cups-web-devices-timeout.patch Patch40: cups-final-content-type.patch Patch41: cups-journal.patch Patch42: cups-synconclose.patch +Patch43: cups-avahi-browse.patch Patch100: cups-lspp.patch @@ -260,6 +261,8 @@ Sends IPP requests to the specified URI and tests and/or displays the results. %patch41 -p1 -b .journal # Set the default for SyncOnClose to Yes. %patch42 -p1 -b .synconclose +# Prevent dnssd backend exiting too early (bug #1026940, STR #4365). +%patch43 -p1 -b .avahi-browse %if %lspp # LSPP support. @@ -640,6 +643,9 @@ rm -f %{cups_serverbin}/backend/smb %{_mandir}/man5/ipptoolfile.5.gz %changelog +* Tue Feb 11 2014 Tim Waugh - 1:1.7.1-3 +- Prevent dnssd backend exiting too early (bug #1026940, STR #4365). + * Mon Feb 03 2014 Jiri Popelka - 1:1.7.1-2 - move macros.cups from /etc/rpm/ to /usr/lib/rpm/macros.d