diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-07-29 18:22:26 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-07-29 18:22:26 -0400 |
commit | 756056e5cbfe51dbdf270f88a8fe2e1d3fbba804 (patch) | |
tree | 06c83c302248b4241149065ab8d6150d095a05d8 /~mtjm/cups-usblp/cups-avahi-5-services.patch | |
parent | 126d73453c3a886c58a627517f9f796f5a8123c9 (diff) | |
parent | 68aa0053f1ccfe28e60c6e23fa3cea017af33edc (diff) |
Merge branch 'master' of ssh://parabolagnulinux.org:1863/srv/git/abslibre
Diffstat (limited to '~mtjm/cups-usblp/cups-avahi-5-services.patch')
-rw-r--r-- | ~mtjm/cups-usblp/cups-avahi-5-services.patch | 161 |
1 files changed, 121 insertions, 40 deletions
diff --git a/~mtjm/cups-usblp/cups-avahi-5-services.patch b/~mtjm/cups-usblp/cups-avahi-5-services.patch index 9713bbc53..820b3c32b 100644 --- a/~mtjm/cups-usblp/cups-avahi-5-services.patch +++ b/~mtjm/cups-usblp/cups-avahi-5-services.patch @@ -1,6 +1,6 @@ -diff -up cups-1.5.0/cgi-bin/admin.c.avahi-5-services cups-1.5.0/cgi-bin/admin.c ---- cups-1.5.0/cgi-bin/admin.c.avahi-5-services 2011-05-20 04:49:49.000000000 +0100 -+++ cups-1.5.0/cgi-bin/admin.c 2011-10-19 11:53:32.123177998 +0100 +diff -up cups-1.5.2/cgi-bin/admin.c.avahi-5-services cups-1.5.2/cgi-bin/admin.c +--- cups-1.5.2/cgi-bin/admin.c.avahi-5-services 2011-08-17 22:01:53.000000000 +0100 ++++ cups-1.5.2/cgi-bin/admin.c 2012-03-14 15:08:25.701611799 +0000 @@ -1643,7 +1643,7 @@ do_config_server(http_t *http) /* I - H else local_protocols[0] = '\0'; @@ -31,10 +31,75 @@ diff -up cups-1.5.0/cgi-bin/admin.c.avahi-5-services cups-1.5.0/cgi-bin/admin.c #ifdef HAVE_LDAP cgiSetVariable("HAVE_LDAP", "1"); -diff -up cups-1.5.0/scheduler/client.c.avahi-5-services cups-1.5.0/scheduler/client.c ---- cups-1.5.0/scheduler/client.c.avahi-5-services 2011-06-10 22:16:18.000000000 +0100 -+++ cups-1.5.0/scheduler/client.c 2011-10-19 11:53:32.127177926 +0100 -@@ -4987,7 +4987,7 @@ valid_host(cupsd_client_t *con) /* I - +diff -up cups-1.5.2/scheduler/avahi.h.avahi-5-services cups-1.5.2/scheduler/avahi.h +--- cups-1.5.2/scheduler/avahi.h.avahi-5-services 2012-03-14 15:07:29.477542381 +0000 ++++ cups-1.5.2/scheduler/avahi.h 2012-03-14 15:08:25.701611799 +0000 +@@ -3,7 +3,7 @@ + * + * Avahi poll implementation for the CUPS scheduler. + * +- * Copyright (C) 2010, 2011 Red Hat, Inc. ++ * Copyright (C) 2010, 2011, 2012 Red Hat, Inc. + * Authors: + * Tim Waugh <twaugh@redhat.com> + * +@@ -32,37 +32,40 @@ + * OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +-#include <config.h> ++#ifndef _CUPS_AVAHI_H_ ++# define _CUPS_AVAHI_H_ + +-#ifdef HAVE_AVAHI +-# include <avahi-client/client.h> +-# include <avahi-client/publish.h> +-#endif /* HAVE_AVAHI */ ++/* ++ * Include necessary headers... ++ */ + +-#ifdef HAVE_AUTHORIZATION_H +-# include <Security/Authorization.h> +-#endif /* HAVE_AUTHORIZATION_H */ ++# include <config.h> + ++# ifdef HAVE_AVAHI ++# include <avahi-client/client.h> ++# include <avahi-client/publish.h> ++# endif /* HAVE_AVAHI */ + +-#ifdef HAVE_AVAHI ++# ifdef HAVE_AVAHI + typedef struct + { + AvahiPoll api; + cups_array_t *watched_fds; + cups_array_t *timeouts; + } AvahiCupsPoll; +-#endif /* HAVE_AVAHI */ ++# endif /* HAVE_AVAHI */ + + /* + * Prototypes... + */ + +-#ifdef HAVE_AVAHI ++# ifdef HAVE_AVAHI + extern AvahiCupsPoll * avahi_cups_poll_new(void); + extern void avahi_cups_poll_free(AvahiCupsPoll *cups_poll); + extern const AvahiPoll *avahi_cups_poll_get(AvahiCupsPoll *cups_poll); +-#endif /* HAVE_AVAHI */ ++# endif /* HAVE_AVAHI */ + ++#endif /* !_CUPS_AVAHI_H_ */ + + /* + * End of "$Id$". +diff -up cups-1.5.2/scheduler/client.c.avahi-5-services cups-1.5.2/scheduler/client.c +--- cups-1.5.2/scheduler/client.c.avahi-5-services 2012-01-13 23:00:22.000000000 +0000 ++++ cups-1.5.2/scheduler/client.c 2012-03-14 15:08:25.703611797 +0000 +@@ -4989,7 +4989,7 @@ valid_host(cupsd_client_t *con) /* I - !strncmp(host, "[::1]:", 6)); } @@ -43,7 +108,7 @@ diff -up cups-1.5.0/scheduler/client.c.avahi-5-services cups-1.5.0/scheduler/cli /* * Check if the hostname is something.local (Bonjour); if so, allow it. */ -@@ -4996,7 +4996,7 @@ valid_host(cupsd_client_t *con) /* I - +@@ -4998,7 +4998,7 @@ valid_host(cupsd_client_t *con) /* I - (!_cups_strcasecmp(end, ".local") || !_cups_strncasecmp(end, ".local:", 7) || !_cups_strcasecmp(end, ".local.") || !_cups_strncasecmp(end, ".local.:", 8))) return (1); @@ -52,10 +117,10 @@ diff -up cups-1.5.0/scheduler/client.c.avahi-5-services cups-1.5.0/scheduler/cli /* * Check if the hostname is an IP address... -diff -up cups-1.5.0/scheduler/conf.c.avahi-5-services cups-1.5.0/scheduler/conf.c ---- cups-1.5.0/scheduler/conf.c.avahi-5-services 2011-10-19 11:53:31.895182225 +0100 -+++ cups-1.5.0/scheduler/conf.c 2011-10-19 11:53:32.131177850 +0100 -@@ -651,7 +651,7 @@ cupsdReadConfiguration(void) +diff -up cups-1.5.2/scheduler/conf.c.avahi-5-services cups-1.5.2/scheduler/conf.c +--- cups-1.5.2/scheduler/conf.c.avahi-5-services 2012-03-14 15:04:17.636305526 +0000 ++++ cups-1.5.2/scheduler/conf.c 2012-03-14 15:08:25.706611803 +0000 +@@ -652,7 +652,7 @@ cupsdReadConfiguration(void) Browsing = CUPS_DEFAULT_BROWSING; DefaultShared = CUPS_DEFAULT_DEFAULT_SHARED; @@ -64,9 +129,9 @@ diff -up cups-1.5.0/scheduler/conf.c.avahi-5-services cups-1.5.0/scheduler/conf. cupsdSetString(&DNSSDRegType, "_ipp._tcp,_cups"); #endif /* HAVE_DNSSD */ -diff -up cups-1.5.0/scheduler/dirsvc.c.avahi-5-services cups-1.5.0/scheduler/dirsvc.c ---- cups-1.5.0/scheduler/dirsvc.c.avahi-5-services 2011-10-19 11:53:32.011180075 +0100 -+++ cups-1.5.0/scheduler/dirsvc.c 2011-10-19 11:53:58.916681461 +0100 +diff -up cups-1.5.2/scheduler/dirsvc.c.avahi-5-services cups-1.5.2/scheduler/dirsvc.c +--- cups-1.5.2/scheduler/dirsvc.c.avahi-5-services 2012-03-14 15:04:17.674305572 +0000 ++++ cups-1.5.2/scheduler/dirsvc.c 2012-03-14 15:08:25.709611806 +0000 @@ -27,6 +27,7 @@ * ldap_connect() - Start new LDAP connection * ldap_reconnect() - Reconnect to LDAP Server @@ -799,15 +864,31 @@ diff -up cups-1.5.0/scheduler/dirsvc.c.avahi-5-services cups-1.5.0/scheduler/dir /* * De-register the individual printers -@@ -2906,6 +3292,7 @@ dnssdStop(void) - p = (cupsd_printer_t *)cupsArrayNext(Printers)) - dnssdDeregisterPrinter(p); - -+#ifdef HAVE_DNSSD - /* +@@ -2910,12 +3296,23 @@ dnssdStop(void) * Shutdown the rest of the service refs... */ -@@ -2926,14 +3313,17 @@ dnssdStop(void) + ++#ifdef HAVE_DNSSD + if (WebIFRef) + { + DNSServiceRefDeallocate(WebIFRef); + WebIFRef = NULL; + } ++#endif /* HAVE_DNSSD */ ++#ifdef HAVE_AVAHI ++ if (AvahiWebIFGroup) ++ { ++ avahi_entry_group_reset (AvahiWebIFGroup); ++ avahi_entry_group_free (AvahiWebIFGroup); ++ AvahiWebIFGroup = NULL; ++ } ++#endif /* HAVE_AVAHI */ + ++#ifdef HAVE_DNSSD + if (RemoteRef) + { + DNSServiceRefDeallocate(RemoteRef); +@@ -2926,14 +3323,17 @@ dnssdStop(void) DNSServiceRefDeallocate(DNSSDRef); DNSSDRef = NULL; @@ -825,7 +906,7 @@ diff -up cups-1.5.0/scheduler/dirsvc.c.avahi-5-services cups-1.5.0/scheduler/dir /* * 'dnssdUpdate()' - Handle DNS-SD queries. */ -@@ -2955,6 +3345,153 @@ dnssdUpdate(void) +@@ -2955,6 +3355,153 @@ dnssdUpdate(void) #endif /* HAVE_DNSSD */ @@ -979,9 +1060,9 @@ diff -up cups-1.5.0/scheduler/dirsvc.c.avahi-5-services cups-1.5.0/scheduler/dir /* * 'get_auth_info_required()' - Get the auth-info-required value to advertise. */ -diff -up cups-1.5.0/scheduler/dirsvc.h.avahi-5-services cups-1.5.0/scheduler/dirsvc.h ---- cups-1.5.0/scheduler/dirsvc.h.avahi-5-services 2011-03-21 02:12:14.000000000 +0000 -+++ cups-1.5.0/scheduler/dirsvc.h 2011-10-19 11:53:32.138177721 +0100 +diff -up cups-1.5.2/scheduler/dirsvc.h.avahi-5-services cups-1.5.2/scheduler/dirsvc.h +--- cups-1.5.2/scheduler/dirsvc.h.avahi-5-services 2011-03-21 02:12:14.000000000 +0000 ++++ cups-1.5.2/scheduler/dirsvc.h 2012-03-14 15:08:25.711611808 +0000 @@ -31,6 +31,10 @@ # endif /* HAVE_LDAP_SSL_H */ #endif /* HAVE_LDAP */ @@ -1054,10 +1135,10 @@ diff -up cups-1.5.0/scheduler/dirsvc.h.avahi-5-services cups-1.5.0/scheduler/dir #ifdef HAVE_LDAP extern void cupsdUpdateLDAPBrowse(void); #endif /* HAVE_LDAP */ -diff -up cups-1.5.0/scheduler/ipp.c.avahi-5-services cups-1.5.0/scheduler/ipp.c ---- cups-1.5.0/scheduler/ipp.c.avahi-5-services 2011-10-19 11:53:31.978180686 +0100 -+++ cups-1.5.0/scheduler/ipp.c 2011-10-19 11:53:32.147177555 +0100 -@@ -6096,7 +6096,7 @@ copy_printer_attrs( +diff -up cups-1.5.2/scheduler/ipp.c.avahi-5-services cups-1.5.2/scheduler/ipp.c +--- cups-1.5.2/scheduler/ipp.c.avahi-5-services 2012-03-14 15:04:17.665305560 +0000 ++++ cups-1.5.2/scheduler/ipp.c 2012-03-14 15:08:25.715611813 +0000 +@@ -6099,7 +6099,7 @@ copy_printer_attrs( ippAddDate(con->response, IPP_TAG_PRINTER, "printer-current-time", ippTimeToDate(curtime)); @@ -1066,7 +1147,7 @@ diff -up cups-1.5.0/scheduler/ipp.c.avahi-5-services cups-1.5.0/scheduler/ipp.c if (!ra || cupsArrayFind(ra, "printer-dns-sd-name")) { if (printer->reg_name) -@@ -6106,7 +6106,7 @@ copy_printer_attrs( +@@ -6109,7 +6109,7 @@ copy_printer_attrs( ippAddInteger(con->response, IPP_TAG_PRINTER, IPP_TAG_NOVALUE, "printer-dns-sd-name", 0); } @@ -1075,9 +1156,9 @@ diff -up cups-1.5.0/scheduler/ipp.c.avahi-5-services cups-1.5.0/scheduler/ipp.c if (!ra || cupsArrayFind(ra, "printer-error-policy")) ippAddString(con->response, IPP_TAG_PRINTER, IPP_TAG_NAME, -diff -up cups-1.5.0/scheduler/main.c.avahi-5-services cups-1.5.0/scheduler/main.c ---- cups-1.5.0/scheduler/main.c.avahi-5-services 2011-10-19 11:53:32.101178406 +0100 -+++ cups-1.5.0/scheduler/main.c 2011-10-19 11:53:32.151177479 +0100 +diff -up cups-1.5.2/scheduler/main.c.avahi-5-services cups-1.5.2/scheduler/main.c +--- cups-1.5.2/scheduler/main.c.avahi-5-services 2012-03-14 15:06:36.511476986 +0000 ++++ cups-1.5.2/scheduler/main.c 2012-03-14 15:08:25.718611817 +0000 @@ -120,6 +120,10 @@ main(int argc, /* I - Number of comm cupsd_listener_t *lis; /* Current listener */ time_t current_time, /* Current time */ @@ -1116,9 +1197,9 @@ diff -up cups-1.5.0/scheduler/main.c.avahi-5-services cups-1.5.0/scheduler/main. #endif /* HAVE_AVAHI */ #ifndef __APPLE__ -diff -up cups-1.5.0/scheduler/printers.c.avahi-5-services cups-1.5.0/scheduler/printers.c ---- cups-1.5.0/scheduler/printers.c.avahi-5-services 2011-10-19 11:53:31.916181835 +0100 -+++ cups-1.5.0/scheduler/printers.c 2011-10-19 11:53:32.156177388 +0100 +diff -up cups-1.5.2/scheduler/printers.c.avahi-5-services cups-1.5.2/scheduler/printers.c +--- cups-1.5.2/scheduler/printers.c.avahi-5-services 2012-03-14 15:04:17.646305537 +0000 ++++ cups-1.5.2/scheduler/printers.c 2012-03-14 15:08:25.720611819 +0000 @@ -883,9 +883,9 @@ cupsdDeletePrinter( cupsdClearString(&p->alert); cupsdClearString(&p->alert_description); @@ -1149,9 +1230,9 @@ diff -up cups-1.5.0/scheduler/printers.c.avahi-5-services cups-1.5.0/scheduler/p } -diff -up cups-1.5.0/scheduler/printers.h.avahi-5-services cups-1.5.0/scheduler/printers.h ---- cups-1.5.0/scheduler/printers.h.avahi-5-services 2011-03-18 18:42:46.000000000 +0000 -+++ cups-1.5.0/scheduler/printers.h 2011-10-19 11:53:32.157177369 +0100 +diff -up cups-1.5.2/scheduler/printers.h.avahi-5-services cups-1.5.2/scheduler/printers.h +--- cups-1.5.2/scheduler/printers.h.avahi-5-services 2011-03-18 18:42:46.000000000 +0000 ++++ cups-1.5.2/scheduler/printers.h 2012-03-14 15:08:25.721611820 +0000 @@ -16,6 +16,9 @@ #ifdef HAVE_DNSSD # include <dns_sd.h> |