summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/cups/cups/cups-str4402.patch190
1 files changed, 190 insertions, 0 deletions
diff --git a/meta/recipes-extended/cups/cups/cups-str4402.patch b/meta/recipes-extended/cups/cups/cups-str4402.patch
new file mode 100644
index 0000000000..69d349cab1
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/cups-str4402.patch
@@ -0,0 +1,190 @@
1
2
3Upstream CUPS issue when building with out dnssd/avahi
4
5https://www.cups.org/str.php?L4408+P-1+S-2+C0+I0+E0+Q
6
7Upstream-Status: Backport [STR #4402]
8
9Signed-off-by: Saul Wold <sgw@linux.intel.com>
10
11--- a/scheduler/dirsvc.c 2014-03-05 13:11:32.000000000 -0800
12+++ b/shceduler/dirsvc.c 2014-05-19 11:33:51.743124614 -0700
13@@ -50,6 +50,9 @@
14 static void update_lpd(int onoff);
15 static void update_smb(int onoff);
16
17+static void deregister_all_printers(int from_callback);
18+static void register_all_printers(int from_callback);
19+
20
21 #if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
22 # ifdef __APPLE__
23@@ -60,12 +63,10 @@
24 # ifdef HAVE_AVAHI
25 static void dnssdClientCallback(AvahiClient *c, AvahiClientState state, void *userdata);
26 # endif /* HAVE_AVAHI */
27-static void dnssdDeregisterAllPrinters(int from_callback);
28 static void dnssdDeregisterInstance(cupsd_srv_t *srv, int from_callback);
29 static void dnssdDeregisterPrinter(cupsd_printer_t *p, int clear_name, int from_callback);
30 static const char *dnssdErrorString(int error);
31 static void dnssdFreeTxtRecord(cupsd_txt_t *txt);
32-static void dnssdRegisterAllPrinters(int from_callback);
33 # ifdef HAVE_DNSSD
34 static void dnssdRegisterCallback(DNSServiceRef sdRef,
35 DNSServiceFlags flags,
36@@ -241,7 +242,7 @@
37 * Register the individual printers
38 */
39
40- dnssdRegisterAllPrinters(0);
41+ register_all_printers(0);
42 }
43
44
45@@ -259,7 +260,7 @@
46 * De-register the individual printers
47 */
48
49- dnssdDeregisterAllPrinters(0);
50+ deregister_all_printers(0);
51
52 /*
53 * Shut down browsing sockets...
54@@ -579,7 +580,7 @@
55 * Register the individual printers
56 */
57
58- dnssdRegisterAllPrinters(1);
59+ register_all_printers(1);
60 break;
61
62 case AVAHI_CLIENT_FAILURE:
63@@ -591,7 +592,7 @@
64 * Unregister everything and close the client...
65 */
66
67- dnssdDeregisterAllPrinters(1);
68+ deregister_all_printers(1);
69 dnssdDeregisterInstance(&WebIFSrv, 1);
70 avahi_client_free(DNSSDClient);
71 DNSSDClient = NULL;
72@@ -631,28 +632,6 @@
73
74
75 /*
76- * 'dnssdDeregisterAllPrinters()' - Deregister all printers.
77- */
78-
79-static void
80-dnssdDeregisterAllPrinters(
81- int from_callback) /* I - Deregistering because of callback? */
82-{
83- cupsd_printer_t *p; /* Current printer */
84-
85-
86- if (!DNSSDMaster)
87- return;
88-
89- for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
90- p;
91- p = (cupsd_printer_t *)cupsArrayNext(Printers))
92- if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER)))
93- dnssdDeregisterPrinter(p, 1, from_callback);
94-}
95-
96-
97-/*
98 * 'dnssdDeregisterInstance()' - Deregister a DNS-SD service instance.
99 */
100
101@@ -858,27 +837,6 @@
102
103
104 /*
105- * 'dnssdRegisterAllPrinters()' - Register all printers.
106- */
107-
108-static void
109-dnssdRegisterAllPrinters(int from_callback) /* I - Called from callback? */
110-{
111- cupsd_printer_t *p; /* Current printer */
112-
113-
114- if (!DNSSDMaster)
115- return;
116-
117- for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
118- p;
119- p = (cupsd_printer_t *)cupsArrayNext(Printers))
120- if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER)))
121- dnssdRegisterPrinter(p, from_callback);
122-}
123-
124-
125-/*
126 * 'dnssdRegisterCallback()' - DNSServiceRegister callback.
127 */
128
129@@ -1813,6 +1771,61 @@
130 }
131
132
133+/*
134+ * 'deregister_all_printers()' - Deregister all printers.
135+ */
136+
137+static void
138+deregister_all_printers(
139+ int from_callback) /* I - Deregistering because of callback? */
140+{
141+ cupsd_printer_t *p; /* Current printer */
142+
143+
144+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
145+ if (!DNSSDMaster)
146+ return;
147+#endif /* HAVE_DNSSD || HAVE_AVAHI */
148+
149+ for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
150+ p;
151+ p = (cupsd_printer_t *)cupsArrayNext(Printers))
152+ if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER)))
153+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
154+ dnssdDeregisterPrinter(p, 1, from_callback);
155+#else
156+ cupsdDeregisterPrinter(p, 1);
157+#endif /* HAVE_DNSSD || HAVE_AVAHI */
158+}
159+
160+
161+/*
162+ * 'register_all_printers()' - Register all printers.
163+ */
164+
165+static void
166+register_all_printers(int from_callback) /* I - Called from callback? */
167+{
168+ cupsd_printer_t *p; /* Current printer */
169+
170+
171+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
172+ if (!DNSSDMaster)
173+ return;
174+#endif /* HAVE_DNSSD || HAVE_AVAHI */
175+
176+ for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
177+ p;
178+ p = (cupsd_printer_t *)cupsArrayNext(Printers))
179+ if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER)))
180+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
181+ dnssdRegisterPrinter(p, from_callback);
182+#else
183+ cupsdRegisterPrinter(p);
184+#endif /* HAVE_DNSSD || HAVE_AVAHI */
185+}
186+
187+
188 /*
189 * End of "$Id: dirsvc.c 11688 2014-03-05 21:11:32Z msweet $".
190 */