Prevent dnssd backend exiting too early (bug #1026940).
Resolves: rhbz#1026940
This commit is contained in:
parent
80d5b09737
commit
7048cf473b
46
cups-avahi-browse.patch
Normal file
46
cups-avahi-browse.patch
Normal file
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -11,7 +11,7 @@ Summary: CUPS printing system
|
|||||||
Name: cups
|
Name: cups
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 1.7.1
|
Version: 1.7.1
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Url: http://www.cups.org/
|
Url: http://www.cups.org/
|
||||||
@ -67,6 +67,7 @@ Patch39: cups-web-devices-timeout.patch
|
|||||||
Patch40: cups-final-content-type.patch
|
Patch40: cups-final-content-type.patch
|
||||||
Patch41: cups-journal.patch
|
Patch41: cups-journal.patch
|
||||||
Patch42: cups-synconclose.patch
|
Patch42: cups-synconclose.patch
|
||||||
|
Patch43: cups-avahi-browse.patch
|
||||||
|
|
||||||
Patch100: cups-lspp.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
|
%patch41 -p1 -b .journal
|
||||||
# Set the default for SyncOnClose to Yes.
|
# Set the default for SyncOnClose to Yes.
|
||||||
%patch42 -p1 -b .synconclose
|
%patch42 -p1 -b .synconclose
|
||||||
|
# Prevent dnssd backend exiting too early (bug #1026940, STR #4365).
|
||||||
|
%patch43 -p1 -b .avahi-browse
|
||||||
|
|
||||||
%if %lspp
|
%if %lspp
|
||||||
# LSPP support.
|
# LSPP support.
|
||||||
@ -640,6 +643,9 @@ rm -f %{cups_serverbin}/backend/smb
|
|||||||
%{_mandir}/man5/ipptoolfile.5.gz
|
%{_mandir}/man5/ipptoolfile.5.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Feb 11 2014 Tim Waugh <twaugh@redhat.com> - 1:1.7.1-3
|
||||||
|
- Prevent dnssd backend exiting too early (bug #1026940, STR #4365).
|
||||||
|
|
||||||
* Mon Feb 03 2014 Jiri Popelka <jpopelka@redhat.com> - 1:1.7.1-2
|
* Mon Feb 03 2014 Jiri Popelka <jpopelka@redhat.com> - 1:1.7.1-2
|
||||||
- move macros.cups from /etc/rpm/ to /usr/lib/rpm/macros.d
|
- move macros.cups from /etc/rpm/ to /usr/lib/rpm/macros.d
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user