From: msweet Date: Sun, 5 Jun 2011 17:00:32 +0000 (+0000) Subject: Merge changes from CUPS 1.5rc1-r9815. X-Git-Tag: release-1.6.3~43 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d4d033982cd67de6be9e472ff79a5538874c1651;p=thirdparty%2Fcups.git Merge changes from CUPS 1.5rc1-r9815. git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@3299 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/CHANGES.txt b/CHANGES.txt index 53a354bce5..e79e4884bc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,13 @@ -CHANGES.txt - 2011-05-26 +CHANGES.txt - 2011-06-05 ------------------------ +CHANGES IN CUPS V1.5rc1 + + - The dnssd backend took too long to discover printers on large or busy + networks with the new default timeout used by lpinfo and the web + interface. This resulted in "lost" printers. + + CHANGES IN CUPS V1.5b2 - Documentation updates. diff --git a/INSTALL.txt b/INSTALL.txt index 8d13a9e38a..cc97983432 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -1,5 +1,5 @@ -INSTALL - CUPS v1.5b2 - 2011-05-26 ----------------------------------- +INSTALL - CUPS v1.5rc1 - 2011-06-05 +----------------------------------- This file describes how to compile and install CUPS from source code. For more information on CUPS see the file called "README.txt". A complete change log can diff --git a/README.txt b/README.txt index e476184753..bb9497e82c 100644 --- a/README.txt +++ b/README.txt @@ -1,5 +1,5 @@ -README - CUPS v1.5b2 - 2011-05-26 ---------------------------------- +README - CUPS v1.5rc1 - 2011-06-05 +---------------------------------- Looking for compile instructions? Read the file "INSTALL.txt" instead... diff --git a/backend/dnssd.c b/backend/dnssd.c index ac547ab541..d1392ed2a7 100644 --- a/backend/dnssd.c +++ b/backend/dnssd.c @@ -44,6 +44,7 @@ typedef enum { CUPS_DEVICE_PRINTER = 0, /* lpd://... */ CUPS_DEVICE_IPP, /* ipp://... */ + CUPS_DEVICE_IPPS, /* ipps://... */ CUPS_DEVICE_FAX_IPP, /* ipp://... */ CUPS_DEVICE_PDL_DATASTREAM, /* socket://... */ CUPS_DEVICE_RIOUSBPRINT /* riousbprint://... */ @@ -123,9 +124,11 @@ main(int argc, /* I - Number of command-line args */ fax_ipp_ref, /* IPP fax service reference */ ipp_ref, /* IPP service reference */ ipp_tls_ref, /* IPP w/TLS service reference */ + ipps_ref, /* IPP service reference */ local_fax_ipp_ref, /* Local IPP fax service reference */ local_ipp_ref, /* Local IPP service reference */ local_ipp_tls_ref, /* Local IPP w/TLS service reference */ + local_ipps_ref, /* Local IPP service reference */ local_printer_ref, /* Local LPD service reference */ pdl_datastream_ref, /* AppSocket service reference */ printer_ref, /* LPD service reference */ @@ -215,6 +218,10 @@ main(int argc, /* I - Number of command-line args */ DNSServiceBrowse(&ipp_tls_ref, kDNSServiceFlagsShareConnection, 0, "_ipp-tls._tcp", NULL, browse_callback, devices); + ipps_ref = main_ref; + DNSServiceBrowse(&ipp_ref, kDNSServiceFlagsShareConnection, 0, + "_ipps._tcp", NULL, browse_callback, devices); + local_fax_ipp_ref = main_ref; DNSServiceBrowse(&local_fax_ipp_ref, kDNSServiceFlagsShareConnection, kDNSServiceInterfaceIndexLocalOnly, @@ -230,6 +237,11 @@ main(int argc, /* I - Number of command-line args */ kDNSServiceInterfaceIndexLocalOnly, "_ipp-tls._tcp", NULL, browse_local_callback, devices); + local_ipps_ref = main_ref; + DNSServiceBrowse(&local_ipp_ref, kDNSServiceFlagsShareConnection, + kDNSServiceInterfaceIndexLocalOnly, + "_ipps._tcp", NULL, browse_local_callback, devices); + local_printer_ref = main_ref; DNSServiceBrowse(&local_printer_ref, kDNSServiceFlagsShareConnection, kDNSServiceInterfaceIndexLocalOnly, @@ -256,8 +268,8 @@ main(int argc, /* I - Number of command-line args */ FD_ZERO(&input); FD_SET(fd, &input); - timeout.tv_sec = 1; - timeout.tv_usec = 0; + timeout.tv_sec = 0; + timeout.tv_usec = 250000; if (select(fd + 1, &input, NULL, NULL, &timeout) < 0) continue; @@ -280,19 +292,26 @@ main(int argc, /* I - Number of command-line args */ cups_device_t *best; /* Best matching device */ char device_uri[1024]; /* Device URI */ int count; /* Number of queries */ - + int sent; /* Number of sent */ for (device = (cups_device_t *)cupsArrayFirst(devices), - best = NULL, count = 0; + best = NULL, count = 0, sent = 0; device; device = (cups_device_t *)cupsArrayNext(devices)) + { + if (device->sent) + sent ++; + + if (device->ref) + count ++; + if (!device->ref && !device->sent) { /* * Found the device, now get the TXT record(s) for it... */ - if (count < 10) + if (count < 20) { device->ref = main_ref; @@ -338,6 +357,8 @@ main(int argc, /* I - Number of command-line args */ best->name, best->device_id, NULL); best->sent = 1; best = device; + + sent ++; } else if (best->priority > device->priority || (best->priority == device->priority && @@ -345,10 +366,17 @@ main(int argc, /* I - Number of command-line args */ { best->sent = 1; best = device; + + sent ++; } else + { device->sent = 1; + + sent ++; + } } + } if (best) { @@ -361,7 +389,11 @@ main(int argc, /* I - Number of command-line args */ cupsBackendReport("network", device_uri, best->make_and_model, best->name, best->device_id, NULL); best->sent = 1; + sent ++; } + + if (sent == cupsArrayCount(devices)) + break; } } @@ -558,9 +590,11 @@ get_device(cups_array_t *devices, /* I - Device array */ key.name = (char *)serviceName; - if (!strcmp(regtype, "_ipp._tcp.") || - !strcmp(regtype, "_ipp-tls._tcp.")) + if (!strcmp(regtype, "_ipp._tcp.")) key.type = CUPS_DEVICE_IPP; + else if (!strcmp(regtype, "_ipps._tcp.") || + !strcmp(regtype, "_ipp-tls._tcp.")) + key.type = CUPS_DEVICE_IPPS; else if (!strcmp(regtype, "_fax-ipp._tcp.")) key.type = CUPS_DEVICE_FAX_IPP; else if (!strcmp(regtype, "_printer._tcp.")) @@ -680,9 +714,11 @@ query_callback( if ((ptr = strstr(name, "._")) != NULL) *ptr = '\0'; - if (strstr(fullName, "_ipp._tcp.") || - strstr(fullName, "_ipp-tls._tcp.")) + if (strstr(fullName, "_ipp._tcp.")) dkey.type = CUPS_DEVICE_IPP; + else if (strstr(fullName, "_ipps._tcp.") || + strstr(fullName, "_ipp-tls._tcp.")) + dkey.type = CUPS_DEVICE_IPPS; else if (strstr(fullName, "_fax-ipp._tcp.")) dkey.type = CUPS_DEVICE_FAX_IPP; else if (strstr(fullName, "_printer._tcp.")) @@ -754,9 +790,16 @@ query_callback( if (data < datanext) memcpy(value, data, datanext - data); value[datanext - data] = '\0'; + + fprintf(stderr, "DEBUG2: query_callback: \"%s=%s\".\n", + key, value); } else + { + fprintf(stderr, "DEBUG2: query_callback: \"%s\" with no value.\n", + key); continue; + } if (!_cups_strncasecmp(key, "usb_", 4)) { @@ -800,6 +843,7 @@ query_callback( else if (!_cups_strcasecmp(key, "priority")) device->priority = atoi(value); else if ((device->type == CUPS_DEVICE_IPP || + device->type == CUPS_DEVICE_IPPS || device->type == CUPS_DEVICE_PRINTER) && !_cups_strcasecmp(key, "printer-type")) { diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4 index a4635c93c3..06dce8181a 100644 --- a/config-scripts/cups-common.m4 +++ b/config-scripts/cups-common.m4 @@ -20,7 +20,7 @@ dnl Set the name of the config header file... AC_CONFIG_HEADER(config.h) dnl Version number information... -CUPS_VERSION="1.5b2" +CUPS_VERSION="1.5rc1" CUPS_REVISION="" #if test -z "$CUPS_REVISION" -a -d .svn; then # CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`" diff --git a/cups/file.c b/cups/file.c index cd76dde14d..daa09da853 100644 --- a/cups/file.c +++ b/cups/file.c @@ -39,6 +39,7 @@ * cupsFilePeekChar() - Peek at the next character from a file. * cupsFilePrintf() - Write a formatted string. * cupsFilePutChar() - Write a character. + * cupsFilePutConf() - Write a configuration line. * cupsFilePuts() - Write a string. * cupsFileRead() - Read from a file. * cupsFileRewind() - Set the current file position to the beginning of @@ -52,6 +53,7 @@ * cupsFileWrite() - Write to a file. * cups_compress() - Compress a buffer of data. * cups_fill() - Fill the input buffer. + * cups_open() - Safely open a file for writing. * cups_read() - Read from a file descriptor. * cups_write() - Write to a file descriptor. */ diff --git a/doc/help/spec-ppd.html b/doc/help/spec-ppd.html index 1b24af8d62..21a9801184 100644 --- a/doc/help/spec-ppd.html +++ b/doc/help/spec-ppd.html @@ -604,9 +604,10 @@ f(x) = density * x gamma

Customizing the Profile Selection Keywords

-

The MediaType and Resolution main keywords can be reassigned to different main keywords, allowing drivers to do color profile selection based on different parameters. The cupsICCQualifier2 and cupsICCQualifier3 keywords define the mapping from selector to main keyword:

+

The ColorModel, MediaType, and Resolution main keywords can be reassigned to different main keywords, allowing drivers to do color profile selection based on different parameters. The cupsICCQualifier1, cupsICCQualifier2, and cupsICCQualifier3 keywords define the mapping from selector to main keyword:

+*cupsICCQualifier1: MainKeyword1
 *cupsICCQualifier2: MainKeyword2
 *cupsICCQualifier3: MainKeyword3
 
@@ -614,6 +615,7 @@ f(x) = density * x gamma

The default mapping is as follows:

+*cupsICCQualifier1: ColorModel
 *cupsICCQualifier2: MediaType
 *cupsICCQualifier3: Resolution
 
diff --git a/filter/spec-ppd.shtml b/filter/spec-ppd.shtml index d03f9df5ed..670e89913c 100644 --- a/filter/spec-ppd.shtml +++ b/filter/spec-ppd.shtml @@ -165,9 +165,10 @@ f(x) = density * x gamma

Customizing the Profile Selection Keywords

-

The MediaType and Resolution main keywords can be reassigned to different main keywords, allowing drivers to do color profile selection based on different parameters. The cupsICCQualifier2 and cupsICCQualifier3 keywords define the mapping from selector to main keyword:

+

The ColorModel, MediaType, and Resolution main keywords can be reassigned to different main keywords, allowing drivers to do color profile selection based on different parameters. The cupsICCQualifier1, cupsICCQualifier2, and cupsICCQualifier3 keywords define the mapping from selector to main keyword:

+*cupsICCQualifier1: MainKeyword1
 *cupsICCQualifier2: MainKeyword2
 *cupsICCQualifier3: MainKeyword3
 
@@ -175,6 +176,7 @@ f(x) = density * x gamma

The default mapping is as follows:

+*cupsICCQualifier1: ColorModel
 *cupsICCQualifier2: MediaType
 *cupsICCQualifier3: Resolution