From: msweet Date: Tue, 25 Jun 2013 16:46:38 +0000 (+0000) Subject: Fix ippfind for Linux/Avahi. X-Git-Tag: release-1.7rc1~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7e5023ddea84fafcc210c05241ca8432a55d8cba;p=thirdparty%2Fcups.git Fix ippfind for Linux/Avahi. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11064 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/doc/help/man-client.conf.html b/doc/help/man-client.conf.html index dfcac80f6..ee9324460 100644 --- a/doc/help/man-client.conf.html +++ b/doc/help/man-client.conf.html @@ -11,7 +11,7 @@ client.conf - client configuration file for cups

Description

The client.conf file configures the CUPS client and is -normally located in the /private/etc/cups or ~/.cups +normally located in the /etc/cups or ~/.cups directory. Each line in the file can be a configuration directive, a blank line, or a comment. Comment lines start with the # character. diff --git a/doc/help/man-cups-deviced.html b/doc/help/man-cups-deviced.html index a64b7a707..1940f642d 100644 --- a/doc/help/man-cups-deviced.html +++ b/doc/help/man-cups-deviced.html @@ -14,7 +14,7 @@ cups-deviced - cups device daemon request-id limit user-id options

Description

cups-deviced polls the backends in -/usr/libexec/cups/backend for a list of available devices. +/usr/lib/cups/backend for a list of available devices. It is run by cupsd(8) in response to a CUPS-Get-Devices request. The output format is an IPP response message. The request-id argument is the request ID diff --git a/doc/help/man-cups-driverd.html b/doc/help/man-cups-driverd.html index 1fe857272..e161435b6 100644 --- a/doc/help/man-cups-driverd.html +++ b/doc/help/man-cups-driverd.html @@ -36,7 +36,7 @@ accordingly.

Drivers

Drivers can be static PPD files under the /usr/share/cups/model directory or programs under the -/usr/libexec/cups/driver directory. Static PPD files must +/usr/lib/cups/driver directory. Static PPD files must conform to the Adobe PPD File Format Specification version 4.3 and may be compressed using the gzip(1) program. Driver programs must implement the command-line interface shown in the diff --git a/doc/help/man-cups-files.conf.html b/doc/help/man-cups-files.conf.html index 2d686e9e2..8c3a610fd 100644 --- a/doc/help/man-cups-files.conf.html +++ b/doc/help/man-cups-files.conf.html @@ -12,7 +12,7 @@ cups-files.conf - file and directory configuration file for cups

Description

The cups-files.conf file configures the files and directories used by the CUPS scheduler, cupsd(8). It is normally located in the -/private/etc/cups directory. +/etc/cups directory.

Each line in the file can be a configuration directive, a blank line, or a comment. Comment lines start with the # character.

Directives

diff --git a/doc/help/man-cups-lpd.html b/doc/help/man-cups-lpd.html index 69f098db4..fc891605a 100644 --- a/doc/help/man-cups-lpd.html +++ b/doc/help/man-cups-lpd.html @@ -27,7 +27,7 @@ add the following line to the inetd.conf file to enable the
 
-    printer stream tcp nowait lp /usr/libexec/cups/daemon/cups-lpd cups-lpd \
+    printer stream tcp nowait lp /usr/lib/cups/daemon/cups-lpd cups-lpd \
         -o document-format=application/octet-stream
 

Note: If you are using Solaris 10 or higher, you must run @@ -46,7 +46,7 @@ named /etc/xinetd.d/cups containing the following lines: user = lp group = sys passenv = - server = /usr/libexec/cups/daemon/cups-lpd + server = /usr/lib/cups/daemon/cups-lpd server_args = -o document-format=application/octet-stream } diff --git a/doc/help/man-cups-snmp.html b/doc/help/man-cups-snmp.html index c354a6206..9b80a8f7f 100644 --- a/doc/help/man-cups-snmp.html +++ b/doc/help/man-cups-snmp.html @@ -10,7 +10,7 @@

Name

snmp - cups snmp backend

Synopsis

-/usr/libexec/cups/backend/snmp +/usr/lib/cups/backend/snmp ip-address-or-hostname
lpinfo -v --include-schemes snmp @@ -34,7 +34,7 @@ The CUPS SNMP backend uses the information from the Host, Printer, and Port Monitor MIBs along with some vendor private MIBs and intelligent port probes to determine the correct device URI and make and model for each printer.

Configuration

-The SNMP backend reads the /private/etc/cups/snmp.conf configuration file, if +The SNMP backend reads the /etc/cups/snmp.conf configuration file, if present, to set the default broadcast address, community name, and logging level. The configuration file is documented in cups-snmp.conf(5). The DebugLevel value can be overridden using the CUPS_DEBUG_LEVEL environment diff --git a/doc/help/man-cupsd.conf.html b/doc/help/man-cupsd.conf.html index 032b8db87..995fda2dc 100644 --- a/doc/help/man-cupsd.conf.html +++ b/doc/help/man-cupsd.conf.html @@ -11,7 +11,7 @@ cupsd.conf - server configuration file for cups

Description

The cupsd.conf file configures the CUPS scheduler, cupsd(8). It -is normally located in the /private/etc/cups directory. Note: +is normally located in the /etc/cups directory. Note: File, directory, and user configuration directives that used to be allowed in the cupsd.conf file are now stored in the cups-files.conf(5) instead in order to prevent certain types of privilege escalation attacks. diff --git a/doc/help/man-cupsd.html b/doc/help/man-cupsd.html index 6df5475fc..b292cba20 100644 --- a/doc/help/man-cupsd.html +++ b/doc/help/man-cupsd.html @@ -18,7 +18,7 @@ cupsd - cups scheduler cupsd is the scheduler for CUPS. It implements a printing system based upon the Internet Printing Protocol, version 2.1. If no options are specified on the command-line then the default configuration file -/private/etc/cups/cupsd.conf will be used. +/etc/cups/cupsd.conf will be used.

Options

-c config-file diff --git a/doc/help/man-lpoptions.html b/doc/help/man-lpoptions.html index c342652cc..c5c2fa7ca 100644 --- a/doc/help/man-lpoptions.html +++ b/doc/help/man-lpoptions.html @@ -118,14 +118,14 @@ standard output.

Root Account Options

When run by the root user, lpoptions gets and sets default options and instances for all users in the -/private/etc/cups/lpoptions file. +/etc/cups/lpoptions file.

Compatibility

The lpoptions command is unique to CUPS.

Files

~/.cups/lpoptions - user defaults and instances created by non-root users.
-/private/etc/cups/lpoptions - system-wide defaults and instances +/etc/cups/lpoptions - system-wide defaults and instances created by the root user.

See Also

cancel(1), lp(1), lpadmin(8), lpr(1), diff --git a/test/ippfind.c b/test/ippfind.c index 16967d9ca..464d5d890 100644 --- a/test/ippfind.c +++ b/test/ippfind.c @@ -232,11 +232,12 @@ static int poll_callback(struct pollfd *pollfds, static void resolve_callback(AvahiServiceResolver *res, AvahiIfIndex interface, AvahiProtocol protocol, - AvahiBrowserEvent event, + AvahiResolverEvent event, const char *serviceName, const char *regtype, const char *replyDomain, const char *host_name, + const AvahiAddress *address, uint16_t port, AvahiStringList *txt, AvahiLookupResultFlags flags, @@ -1170,7 +1171,7 @@ main(int argc, /* I - Number of command-line args */ avahi_client = avahi_client_new(avahi_simple_poll_get(avahi_poll), 0, client_callback, avahi_poll, &err); - if (!client) + if (!avahi_client) { _cupsLangPrintf(stderr, _("ippfind: Unable to use Bonjour: %s"), dnssd_error_string(err)); @@ -1240,7 +1241,7 @@ main(int argc, /* I - Number of command-line args */ if (service->ref) err = 0; else - err = avahi_client_get_error(avahi_client); + err = avahi_client_errno(avahi_client); #endif /* HAVE_DNSSD */ } else @@ -1270,7 +1271,7 @@ main(int argc, /* I - Number of command-line args */ browse_callback, services)) err = 0; else - err = avahi_client_get_errno(avahi_client); + err = avahi_client_errno(avahi_client); #endif /* HAVE_DNSSD */ } @@ -1406,7 +1407,7 @@ main(int argc, /* I - Number of command-line args */ if (service->ref) err = 0; else - err = avahi_client_get_errno(avahi_client); + err = avahi_client_errno(avahi_client); #endif /* HAVE_DNSSD */ if (err) @@ -1431,7 +1432,7 @@ main(int argc, /* I - Number of command-line args */ #ifdef HAVE_DNSSD DNSServiceRefDeallocate(service->ref); #else - avahi_record_browser_free(service->ref); + avahi_service_resolver_free(service->ref); #endif /* HAVE_DNSSD */ service->ref = NULL; @@ -2577,30 +2578,32 @@ resolve_callback( AvahiServiceResolver *resolver, /* I - Resolver */ AvahiIfIndex interface, /* I - Interface */ AvahiProtocol protocol, /* I - Address protocol */ - AvahiBrowserEvent event, /* I - Event */ + AvahiResolverEvent event, /* I - Event */ const char *serviceName,/* I - Service name */ const char *regtype, /* I - Registration type */ const char *replyDomain,/* I - Domain name */ const char *hostTarget, /* I - FQDN */ + const AvahiAddress *address, /* I - Address */ uint16_t port, /* I - Port number */ AvahiStringList *txt, /* I - TXT records */ AvahiLookupResultFlags flags, /* I - Lookup flags */ void *context) /* I - Service */ { - char uri[1024]; /* URI */ - key[256], /* TXT key */ + char key[256], /* TXT key */ *value; /* TXT value */ ippfind_srv_t *service = (ippfind_srv_t *)context; /* Service */ AvahiStringList *current; /* Current TXT key/value pair */ + (void)address; + if (event != AVAHI_RESOLVER_FOUND) { bonjour_error = 1; avahi_service_resolver_free(resolver); - avahi_simple_poll_quit(uribuf->poll); + avahi_simple_poll_quit(avahi_poll); return; }