From: mike Date: Thu, 13 Dec 2012 19:03:31 +0000 (+0000) Subject: The ipptool program now supports variable substitution in OPERATION and DELAY X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88e7963770013d2c05fde3cf55bab78e6947d2af;p=thirdparty%2Fcups.git The ipptool program now supports variable substitution in OPERATION and DELAY directives (STR #4175) git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10759 7a7537e8-13f0-0310-91df-b6672ffda945 --- diff --git a/CHANGES-1.6.txt b/CHANGES-1.6.txt index 2fa43e7bda..7ce8f372e6 100644 --- a/CHANGES-1.6.txt +++ b/CHANGES-1.6.txt @@ -7,6 +7,8 @@ CHANGES IN CUPS V1.6.2 - Security: All file, directory, user, and group settings are now stored in a separate cups-files.conf configuration file that cannot be set through the CUPS web interface or APIs (STR #4223) + - The ipptool program now supports variable substitution in OPERATION + and DELAY directives (STR #4175) - The IPP backend now stops queues when the server configuration prevents successful job submission (STR #4125) - The XML output of ipptool contained empty dictionaries (STR #4136) diff --git a/test/ipptool.c b/test/ipptool.c index 56d56df676..0e42414f7f 100644 --- a/test/ipptool.c +++ b/test/ipptool.c @@ -1494,13 +1494,15 @@ do_tests(_cups_vars_t *vars, /* I - Variables */ * Operation... */ - if (!get_token(fp, token, sizeof(token), &linenum)) + if (!get_token(fp, temp, sizeof(temp), &linenum)) { print_fatal_error("Missing OPERATION code on line %d.", linenum); pass = 0; goto test_exit; } + expand_variables(vars, token, temp, sizeof(token)); + if ((op = ippOpValue(token)) == (ipp_op_t)-1 && (op = strtol(token, NULL, 0)) == 0) { @@ -1543,13 +1545,15 @@ do_tests(_cups_vars_t *vars, /* I - Variables */ double delay; - if (!get_token(fp, token, sizeof(token), &linenum)) + if (!get_token(fp, temp, sizeof(temp), &linenum)) { print_fatal_error("Missing DELAY value on line %d.", linenum); pass = 0; goto test_exit; } + expand_variables(vars, token, temp, sizeof(token)); + if ((delay = _cupsStrScand(token, NULL, localeconv())) <= 0.0) { print_fatal_error("Bad DELAY value \"%s\" on line %d.", token,