From f99f36983167d7ff4b3cf3348a252a465c48ff9c Mon Sep 17 00:00:00 2001 From: msweet Date: Wed, 15 Jun 2011 00:37:13 +0000 Subject: [PATCH] Merge changes from CUPS 1.5rc1-r9833. git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@3318 a1ca3aef-8c08-0410-bb20-df032aa958be --- CHANGES.txt | 13 ++++- INSTALL.txt | 2 +- README.txt | 2 +- backend/ieee1284.c | 24 +++++++-- backend/runloop.c | 5 +- backend/usb-libusb.c | 93 ++++++++++++++++++++++++++++++++- config-scripts/cups-common.m4 | 2 +- config-scripts/cups-compiler.m4 | 2 +- cups/conflicts.c | 8 +-- cups/http-support.c | 2 +- cups/transcode.c | 13 +++-- packaging/cups.spec.in | 10 ++-- scheduler/client.c | 2 +- scheduler/conf.c | 16 +++++- scheduler/cups-driverd.cxx | 9 +++- scheduler/ipp.c | 16 ++++++ scheduler/job.c | 16 +++--- scheduler/sysman.c | 34 ++++++------ test/ipp-1.1.test | 28 +++++----- test/ipptool.c | 4 +- 20 files changed, 230 insertions(+), 71 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index e79e4884b..0ae200933 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,8 +1,19 @@ -CHANGES.txt - 2011-06-05 +CHANGES.txt - 2011-06-14 ------------------------ CHANGES IN CUPS V1.5rc1 + - Compile fixes (STR #3849, STR #3850) + - The scheduler didn't check for empty values for several configuration + directives (STR #3861) + - ipptool didn't generate valid XML when a test was skipped. + - Added additional error checking to the 1284 device ID code (STR #3858) + - Fixed some compatibility issues migrating from the old usblp backend + to the libusb backend (STR #3860) + - Fixed the wake-from-sleep printing behavior on Mac OS X. + - The scheduler incorrectly allowed jobs to be held from a terminating + state. + - The cups-driverd program could crash when a PPD was renamed. - 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. diff --git a/INSTALL.txt b/INSTALL.txt index cc9798343..06b718db0 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -1,4 +1,4 @@ -INSTALL - CUPS v1.5rc1 - 2011-06-05 +INSTALL - CUPS v1.5rc1 - 2011-06-14 ----------------------------------- This file describes how to compile and install CUPS from source code. For more diff --git a/README.txt b/README.txt index bb9497e82..42892ce75 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -README - CUPS v1.5rc1 - 2011-06-05 +README - CUPS v1.5rc1 - 2011-06-14 ---------------------------------- Looking for compile instructions? Read the file "INSTALL.txt" diff --git a/backend/ieee1284.c b/backend/ieee1284.c index a9346d7a5..a837325f0 100644 --- a/backend/ieee1284.c +++ b/backend/ieee1284.c @@ -65,6 +65,7 @@ backendGetDeviceID( # if defined(__sun) && defined(ECPPIOC_GETDEVID) struct ecpp_device_id did; /* Device ID buffer */ # endif /* __sun && ECPPIOC_GETDEVID */ + char *ptr; /* Pointer into device ID */ DEBUG_printf(("backendGetDeviceID(fd=%d, device_id=%p, device_id_size=%d, " @@ -186,7 +187,7 @@ backendGetDeviceID( * and then limit the length to the size of our buffer... */ - if (length > device_id_size) + if (length > device_id_size || length < 14) length = (((unsigned)device_id[1] & 255) << 8) + ((unsigned)device_id[0] & 255); @@ -224,11 +225,12 @@ backendGetDeviceID( device_id[length] = '\0'; } } -# ifdef DEBUG else + { DEBUG_printf(("backendGetDeviceID: ioctl failed - %s\n", strerror(errno))); -# endif /* DEBUG */ + *device_id = '\0'; + } # endif /* __linux */ # if defined(__sun) && defined(ECPPIOC_GETDEVID) @@ -256,6 +258,22 @@ backendGetDeviceID( # endif /* __sun && ECPPIOC_GETDEVID */ } + /* + * Check whether device ID is valid. Turn line breaks and tabs to spaces and + * reject device IDs with non-printable characters. + */ + + for (ptr = device_id; *ptr; ptr ++) + if (_cups_isspace(*ptr)) + *ptr = ' '; + else if ((*ptr & 255) < ' ' || *ptr == 127) + { + DEBUG_printf(("backendGetDeviceID: Bad device_id character %d.", + *ptr & 255)); + *device_id = '\0'; + break; + } + DEBUG_printf(("backendGetDeviceID: device_id=\"%s\"\n", device_id)); if (scheme && uri) diff --git a/backend/runloop.c b/backend/runloop.c index 43b839996..227883bfa 100644 --- a/backend/runloop.c +++ b/backend/runloop.c @@ -436,10 +436,7 @@ backendWaitLoop( { fd_set input; /* Input set for reading */ time_t curtime, /* Current time */ - snmp_update = 0; -#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET) - struct sigaction action; /* Actions for POSIX signals */ -#endif /* HAVE_SIGACTION && !HAVE_SIGSET */ + snmp_update = 0; /* Last SNMP status update */ fprintf(stderr, "DEBUG: backendWaitLoop(snmp_fd=%d, addr=%p, side_cb=%p)\n", diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c index 7f8c74a08..4a36ca483 100644 --- a/backend/usb-libusb.c +++ b/backend/usb-libusb.c @@ -505,6 +505,7 @@ make_device_uri( *mdl, /* Model */ *des, /* Description */ *sern; /* Serial number */ + size_t mfglen; /* Length of manufacturer string */ char tempmfg[256], /* Temporary manufacturer string */ tempsern[256], /* Temporary serial number string */ *tempptr; /* Pointer into temp string */ @@ -584,6 +585,16 @@ make_device_uri( mfg = tempmfg; } + mfglen = strlen(mfg); + + if (!strncasecmp(mdl, mfg, mfglen) && _cups_isspace(mdl[mfglen])) + { + mdl += mfglen + 1; + + while (_cups_isspace(*mdl)) + mdl ++; + } + /* * Generate the device URI from the manufacturer, model, serial number, * and interface number... @@ -736,7 +747,87 @@ print_cb(usb_printer_t *printer, /* I - Printer */ const char *device_id, /* I - IEEE-1284 device ID */ const void *data) /* I - User data (make, model, S/N) */ { - return (!strcmp((char *)data, device_uri)); + char requested_uri[1024], /* Requested URI */ + *requested_ptr, /* Pointer into requested URI */ + detected_uri[1024], /* Detected URI */ + *detected_ptr; /* Pointer into detected URI */ + + + /* + * If we have an exact match, stop now... + */ + + if (!strcmp((char *)data, device_uri)) + return (1); + + /* + * Work on copies of the URIs... + */ + + strlcpy(requested_uri, (char *)data, sizeof(requested_uri)); + strlcpy(detected_uri, device_uri, sizeof(detected_uri)); + + /* + * libusb-discovered URIs can have an "interface" specification and this + * never happens for usblp-discovered URIs, so remove the "interface" + * specification from the URI which we are checking currently. This way a + * queue for a usblp-discovered printer can now be accessed via libusb. + * + * Similarly, strip "?serial=NNN...NNN" as needed. + */ + + if ((requested_ptr = strstr(requested_uri, "?interface=")) == NULL) + requested_ptr = strstr(requested_uri, "&interface="); + if ((detected_ptr = strstr(detected_uri, "?interface=")) == NULL) + detected_ptr = strstr(detected_uri, "&interface="); + + if (!requested_ptr && detected_ptr) + { + /* + * Strip "[?&]interface=nnn" from the detected printer. + */ + + *detected_ptr = '\0'; + } + else if (requested_ptr && !detected_ptr) + { + /* + * Strip "[?&]interface=nnn" from the requested printer. + */ + + *requested_ptr = '\0'; + } + + if ((requested_ptr = strstr(requested_uri, "?serial=?")) != NULL) + { + /* + * Strip "?serial=?" from the requested printer. This is a special + * case, as "?serial=?" means no serial number and not the serial + * number '?'. This is not covered by the checks below... + */ + + *requested_ptr = '\0'; + } + + if ((requested_ptr = strstr(requested_uri, "?serial=")) == NULL && + (detected_ptr = strstr(detected_uri, "?serial=")) != NULL) + { + /* + * Strip "?serial=nnn" from the detected printer. + */ + + *detected_ptr = '\0'; + } + else if (requested_ptr && !detected_ptr) + { + /* + * Strip "?serial=nnn" from the requested printer. + */ + + *requested_ptr = '\0'; + } + + return (!strcmp(requested_uri, detected_uri)); } diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4 index 06dce8181..4c6c5262f 100644 --- a/config-scripts/cups-common.m4 +++ b/config-scripts/cups-common.m4 @@ -406,7 +406,7 @@ AC_ARG_WITH(components, [ --with-components set components to build: case "$COMPONENTS" in all) - BUILDDIRS="filter backend berkeley cgi-bin driver monitor notifier ppdc scheduler systemv conf data locale man doc examples templates" + BUILDDIRS="filter backend berkeley cgi-bin driver monitor notifier ppdc scheduler systemv conf data desktop locale man doc examples templates" ;; core) diff --git a/config-scripts/cups-compiler.m4 b/config-scripts/cups-compiler.m4 index 7a1d453c8..8699f6e55 100644 --- a/config-scripts/cups-compiler.m4 +++ b/config-scripts/cups-compiler.m4 @@ -162,7 +162,7 @@ if test -n "$GCC"; then else AC_MSG_CHECKING(if GCC supports -Wno-tautological-compare) OLDCFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Wno-tautological-compare" + CFLAGS="$CFLAGS -Werror -Wno-tautological-compare" AC_TRY_COMPILE(,, [OPTIM="$OPTIM -Wno-tautological-compare" AC_MSG_RESULT(yes)], diff --git a/cups/conflicts.c b/cups/conflicts.c index dd1bf3deb..cded4585e 100644 --- a/cups/conflicts.c +++ b/cups/conflicts.c @@ -270,7 +270,7 @@ cupsResolveConflicts( * Resolver loop! */ - DEBUG_printf(("1ppdResolveConflicts: Resolver loop with %s!", + DEBUG_printf(("1cupsResolveConflicts: Resolver loop with %s!", consts->resolver)); goto error; } @@ -278,14 +278,14 @@ cupsResolveConflicts( if ((resolver = ppdFindAttr(ppd, "cupsUIResolver", consts->resolver)) == NULL) { - DEBUG_printf(("1ppdResolveConflicts: Resolver %s not found!", + DEBUG_printf(("1cupsResolveConflicts: Resolver %s not found!", consts->resolver)); goto error; } if (!resolver->value) { - DEBUG_printf(("1ppdResolveConflicts: Resolver %s has no value!", + DEBUG_printf(("1cupsResolveConflicts: Resolver %s has no value!", consts->resolver)); goto error; } @@ -507,7 +507,7 @@ cupsResolveConflicts( if (!changed) { - DEBUG_puts("1ppdResolveConflicts: Unable to automatically resolve " + DEBUG_puts("1cupsResolveConflicts: Unable to automatically resolve " "constraint!"); goto error; } diff --git a/cups/http-support.c b/cups/http-support.c index 677dbfd56..c6ca6c2a5 100644 --- a/cups/http-support.c +++ b/cups/http-support.c @@ -466,7 +466,7 @@ _httpAssembleUUID(const char *server, /* I - Server name */ snprintf(data, sizeof(data), "%s:%d:%s:%d:%04x:%04x", server, port, name ? name : server, number, - CUPS_RAND() & 0xffff, CUPS_RAND() & 0xffff); + (unsigned)CUPS_RAND() & 0xffff, (unsigned)CUPS_RAND() & 0xffff); _cupsMD5Init(&md5state); _cupsMD5Append(&md5state, (unsigned char *)data, strlen(data)); diff --git a/cups/transcode.c b/cups/transcode.c index f9736029a..8c58dab6f 100644 --- a/cups/transcode.c +++ b/cups/transcode.c @@ -171,16 +171,17 @@ cupsCharsetToUTF8( if (map_to_utf8 != (iconv_t)-1) { + char *altdestptr = (char *)dest; /* Silence bogus GCC type-punned */ + srclen = strlen(src); outBytesLeft = maxout - 1; - iconv(map_to_utf8, (char **)&src, &srclen, (char **)&destptr, - &outBytesLeft); - *destptr = '\0'; + iconv(map_to_utf8, (char **)&src, &srclen, &altdestptr, &outBytesLeft); + *altdestptr = '\0'; _cupsMutexUnlock(&map_mutex); - return ((int)(destptr - dest)); + return ((int)(altdestptr - (char *)dest)); } _cupsMutexUnlock(&map_mutex); @@ -295,10 +296,12 @@ cupsUTF8ToCharset( if (map_from_utf8 != (iconv_t)-1) { + char *altsrc = (char *)src; /* Silence bogus GCC type-punned */ + srclen = strlen((char *)src); outBytesLeft = maxout - 1; - iconv(map_from_utf8, (char **)&src, &srclen, &destptr, &outBytesLeft); + iconv(map_from_utf8, &altsrc, &srclen, &destptr, &outBytesLeft); *destptr = '\0'; _cupsMutexUnlock(&map_mutex); diff --git a/packaging/cups.spec.in b/packaging/cups.spec.in index 7289b570b..5a0230540 100644 --- a/packaging/cups.spec.in +++ b/packaging/cups.spec.in @@ -5,7 +5,7 @@ # # Original version by Jason McMullan . # -# Copyright 2007-2010 by Apple Inc. +# Copyright 2007-2011 by Apple Inc. # Copyright 1999-2007 by Easy Software Products, all rights reserved. # # These coded instructions, statements, and computer programs are the @@ -79,7 +79,7 @@ Requires: %{name}-libs = %{epoch}:%{version} %description CUPS is the standards-based, open source printing system developed by -Apple Inc. for Mac OS¨ X and other UNIX¨-like operating systems. +Apple Inc. for Mac OS® X and other UNIX®-like operating systems. %description devel This package provides the CUPS headers and development environment. @@ -190,10 +190,11 @@ rm -rf $RPM_BUILD_ROOT %dir /usr/lib/cups %dir /usr/lib/cups/backend /usr/lib/cups/backend/http +/usr/lib/cups/backend/https %attr(0700,root,root) /usr/lib/cups/backend/ipp +/usr/lib/cups/backend/ipps %attr(0700,root,root) /usr/lib/cups/backend/lpd /usr/lib/cups/backend/parallel -/usr/lib/cups/backend/scsi /usr/lib/cups/backend/serial /usr/lib/cups/backend/snmp /usr/lib/cups/backend/socket @@ -203,6 +204,7 @@ rm -rf $RPM_BUILD_ROOT %dir /usr/lib/cups/daemon /usr/lib/cups/daemon/cups-deviced /usr/lib/cups/daemon/cups-driverd +/usr/lib/cups/daemon/cups-exec /usr/lib/cups/daemon/cups-polld %dir /usr/lib/cups/driver %dir /usr/lib/cups/filter @@ -288,8 +290,6 @@ rm -rf $RPM_BUILD_ROOT /usr/share/man/man5/*.conf.5.gz /usr/share/man/man5/ipptoolfile.5.gz /usr/share/man/man5/mime.*.5.gz -%dir /usr/share/man/man7 -/usr/share/man/man7/drv* %dir /usr/share/man/man8 /usr/share/man/man8/accept.8.gz /usr/share/man/man8/cupsaddsmb.8.gz diff --git a/scheduler/client.c b/scheduler/client.c index 8e8395fae..162822b00 100644 --- a/scheduler/client.c +++ b/scheduler/client.c @@ -3220,7 +3220,7 @@ encrypt_client(cupsd_client_t *con) /* I - Client to encrypt */ gnutls_certificate_set_x509_key_file(*credentials, ServerCertificate, ServerKey, GNUTLS_X509_FMT_PEM); - gnutls_init(&con->http.tls), GNUTLS_SERVER); + gnutls_init(&con->http.tls, GNUTLS_SERVER); gnutls_set_default_priority(con->http.tls); gnutls_credentials_set(con->http.tls, GNUTLS_CRD_CERTIFICATE, *credentials); gnutls_transport_set_ptr(con->http.tls, (gnutls_transport_ptr)HTTP(con)); diff --git a/scheduler/conf.c b/scheduler/conf.c index b2f3719d8..d45b6ed30 100644 --- a/scheduler/conf.c +++ b/scheduler/conf.c @@ -2593,11 +2593,11 @@ read_configuration(cups_file_t *fp) /* I - File to read from */ "FaxRetryLimit is deprecated; use " "JobRetryLimit on line %d.", linenum); } - else if (!_cups_strcasecmp(line, "Port") || !_cups_strcasecmp(line, "Listen") + else if ((!_cups_strcasecmp(line, "Port") || !_cups_strcasecmp(line, "Listen") #ifdef HAVE_SSL || !_cups_strcasecmp(line, "SSLPort") || !_cups_strcasecmp(line, "SSLListen") #endif /* HAVE_SSL */ - ) + ) && value) { /* * Add listening address(es) to the list... @@ -3740,6 +3740,12 @@ read_location(cups_file_t *fp, /* I - Configuration file */ else if (!_cups_strcasecmp(line, "") || !_cups_strcasecmp(line, "")) loc = parent; + else if (!value) + { + cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d.", linenum); + if (FatalErrors & CUPSD_FATAL_CONFIG) + return (0); + } else if (!parse_aaa(loc, line, value, linenum)) { cupsdLogMessage(CUPSD_LOG_ERROR, @@ -3889,6 +3895,12 @@ read_policy(cups_file_t *fp, /* I - Configuration file */ op = NULL; } + else if (!value) + { + cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d.", linenum); + if (FatalErrors & CUPSD_FATAL_CONFIG) + return (0); + } else if (!_cups_strcasecmp(line, "JobPrivateAccess") || !_cups_strcasecmp(line, "JobPrivateValues") || !_cups_strcasecmp(line, "SubscriptionPrivateAccess") || diff --git a/scheduler/cups-driverd.cxx b/scheduler/cups-driverd.cxx index 9e0e02005..abe026287 100644 --- a/scheduler/cups-driverd.cxx +++ b/scheduler/cups-driverd.cxx @@ -750,8 +750,11 @@ compare_ppds(const ppd_info_t *p0, /* I - First PPD file */ else if ((diff = cupsdCompareNames(p0->record.make_and_model, p1->record.make_and_model)) != 0) return (diff); + else if ((diff = strcmp(p0->record.languages[0], + p1->record.languages[0])) != 0) + return (diff); else - return (strcmp(p0->record.languages[0], p1->record.languages[0])); + return (compare_names(p0, p1)); } @@ -1408,7 +1411,9 @@ load_drv(const char *filename, /* I - Actual filename */ * Add a dummy entry for the file... */ - add_ppd(name, name, "", "", "", "", "", "", mtime, size, 0, + httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "drv", "", "", 0, + "/%s", name); + add_ppd(name, uri, "", "", "", "", "", "", mtime, size, 0, PPD_TYPE_DRV, "drv"); ChangedPPD = 1; diff --git a/scheduler/ipp.c b/scheduler/ipp.c index 00a016ddb..a2e2a13f7 100644 --- a/scheduler/ipp.c +++ b/scheduler/ipp.c @@ -8885,6 +8885,22 @@ hold_job(cupsd_client_t *con, /* I - Client connection */ return; } + /* + * See if the job is in a state that allows holding... + */ + + if (job->state_value > IPP_JOB_STOPPED) + { + /* + * Return a "not-possible" error... + */ + + send_ipp_status(con, IPP_NOT_POSSIBLE, + _("Job #%d is finished and cannot be altered."), + job->id); + return; + } + /* * Hold the job and return... */ diff --git a/scheduler/job.c b/scheduler/job.c index 595656edc..749f7fcc1 100644 --- a/scheduler/job.c +++ b/scheduler/job.c @@ -2330,14 +2330,14 @@ cupsdSetJobState( if (!cupsdLoadJob(job)) return; - /* - * Don't do anything if the state is unchanged and we aren't purging the - * job... - */ - - oldstate = job->state_value; - if (newstate == oldstate && action != CUPSD_JOB_PURGE) - return; + /* + * Don't do anything if the state is unchanged and we aren't purging the + * job... + */ + + oldstate = job->state_value; + if (newstate == oldstate && action != CUPSD_JOB_PURGE) + return; /* * Stop any processes that are working on the current job... diff --git a/scheduler/sysman.c b/scheduler/sysman.c index 2df34921f..0bab71727 100644 --- a/scheduler/sysman.c +++ b/scheduler/sysman.c @@ -196,6 +196,10 @@ cupsdSetBusyState(void) if (job) newbusy |= 2; + cupsdLogMessage(CUPSD_LOG_DEBUG, + "cupsdSetBusyState: newbusy=\"%s\", busy=\"%s\"", + busy_text[newbusy], busy_text[busy]); + /* * Manage state changes... */ @@ -213,25 +217,23 @@ cupsdSetBusyState(void) vtran = 0; } #endif /* HAVE_VPROC_TRANSACTION_BEGIN */ + } #ifdef kIOPMAssertionTypeDenySystemSleep - if ((busy & 2) && !dark_wake) - { - cupsdLogMessage(CUPSD_LOG_DEBUG2, "Asserting dark wake."); - IOPMAssertionCreateWithName(kIOPMAssertionTypeDenySystemSleep, - kIOPMAssertionLevelOn, - CFSTR("org.cups.cupsd"), &dark_wake); - } - else if (!(busy & 2) && dark_wake) - { - cupsdLogMessage(CUPSD_LOG_DEBUG2, "Releasing dark wake assertion."); - IOPMAssertionRelease(dark_wake); - dark_wake = 0; - } -#endif /* kIOPMAssertionTypeDenySystemSleep */ - - cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdSetBusyState: %s", busy_text[busy]); + if (cupsArrayCount(PrintingJobs) > 0 && !dark_wake) + { + cupsdLogMessage(CUPSD_LOG_DEBUG, "Asserting dark wake."); + IOPMAssertionCreateWithName(kIOPMAssertionTypeDenySystemSleep, + kIOPMAssertionLevelOn, + CFSTR("org.cups.cupsd"), &dark_wake); } + else if (cupsArrayCount(PrintingJobs) == 0 && dark_wake) + { + cupsdLogMessage(CUPSD_LOG_DEBUG, "Releasing dark wake assertion."); + IOPMAssertionRelease(dark_wake); + dark_wake = 0; + } +#endif /* kIOPMAssertionTypeDenySystemSleep */ } diff --git a/test/ipp-1.1.test b/test/ipp-1.1.test index 8f1dcb4ae..0809aab19 100644 --- a/test/ipp-1.1.test +++ b/test/ipp-1.1.test @@ -3,7 +3,7 @@ # # IPP/1.1 test suite. # -# Copyright 2007-2010 by Apple Inc. +# Copyright 2007-2011 by Apple Inc. # Copyright 2001-2006 by Easy Software Products. All rights reserved. # # These coded instructions, statements, and computer programs are the @@ -17,6 +17,10 @@ # ./ipptool -f filename -t printer-uri ipp-1.1.test # +# Regular expression for IPP URI schemes +# Matches strings beginning with ipp:// or ipps:// +DEFINE IPP_URI_SCHEME "/^ipps?://.+$$/" + # Test that a request-id value of 0 is not accepted. # # Required by: RFC 2911 section 3.1.1 @@ -87,7 +91,7 @@ ATTR uri printer-uri $uri STATUS successful-ok - EXPECT printer-uri-supported OF-TYPE uri + EXPECT printer-uri-supported OF-TYPE uri WITH-VALUE "$IPP_URI_SCHEME" } @@ -144,7 +148,7 @@ STATUS successful-ok STATUS client-error-document-format-not-supported - EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag + EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME" EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE >0 EXPECT job-state OF-TYPE enum COUNT 1 IN-GROUP job-attributes-tag @@ -237,7 +241,7 @@ EXPECT printer-state OF-TYPE enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5 EXPECT printer-state-reasons OF-TYPE keyword IN-GROUP printer-attributes-tag EXPECT printer-up-time OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0 - EXPECT printer-uri-supported OF-TYPE uri IN-GROUP printer-attributes-tag SAME-COUNT-AS uri-security-supported + EXPECT printer-uri-supported OF-TYPE uri IN-GROUP printer-attributes-tag SAME-COUNT-AS uri-security-supported WITH-VALUE "$IPP_URI_SCHEME" EXPECT queued-job-count OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 EXPECT uri-authentication-supported OF-TYPE keyword IN-GROUP printer-attributes-tag EXPECT uri-security-supported OF-TYPE keyword IN-GROUP printer-attributes-tag SAME-COUNT-AS uri-authentication-supported @@ -260,7 +264,7 @@ STATUS successful-ok - EXPECT printer-uri-supported OF-TYPE uri IN-GROUP printer-attributes-tag + EXPECT printer-uri-supported OF-TYPE uri IN-GROUP printer-attributes-tag WITH-VALUE "$IPP_URI_SCHEME" EXPECT !printer-name } @@ -279,7 +283,7 @@ STATUS successful-ok EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0 - EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 + EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME" EXPECT !job-printer-uri EXPECT !job-more-info EXPECT !job-name @@ -337,7 +341,7 @@ STATUS successful-ok EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0 - EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 + EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME" EXPECT job-printer-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 EXPECT ?job-more-info OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 EXPECT job-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 @@ -395,7 +399,7 @@ STATUS successful-ok EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0 - EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 + EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME" EXPECT !job-printer-uri EXPECT !job-more-info EXPECT !job-name @@ -515,7 +519,7 @@ STATUS successful-ok EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0 - EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 + EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME" EXPECT !job-printer-uri EXPECT !job-more-info EXPECT !job-name @@ -575,7 +579,7 @@ STATUS successful-ok EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0 - EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 + EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME" EXPECT !job-printer-uri EXPECT !job-more-info EXPECT !job-name @@ -655,7 +659,7 @@ STATUS successful-ok STATUS client-error-document-format-not-supported - EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag + EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME" EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE >0 EXPECT job-state OF-TYPE enum COUNT 1 IN-GROUP job-attributes-tag @@ -700,7 +704,7 @@ STATUS successful-ok EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0 - EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 + EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME" EXPECT job-printer-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 EXPECT ?job-more-info OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 EXPECT job-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 diff --git a/test/ipptool.c b/test/ipptool.c index e2bbe9f4d..81c663d5a 100644 --- a/test/ipptool.c +++ b/test/ipptool.c @@ -2569,11 +2569,11 @@ do_tests(_cups_vars_t *vars, /* I - Variables */ puts(""); } + skip_error: + if (Output == _CUPS_OUTPUT_PLIST) puts(""); - skip_error: - ippDelete(response); response = NULL; -- 2.39.2