]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
The ipptool program now supports variable substitution in OPERATION and DELAY
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 13 Dec 2012 19:03:31 +0000 (19:03 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 13 Dec 2012 19:03:31 +0000 (19:03 +0000)
directives (STR #4175)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10759 7a7537e8-13f0-0310-91df-b6672ffda945

CHANGES-1.6.txt
test/ipptool.c

index 2fa43e7bdaebb2e96ee1a3be0a701c2cb542f3fd..7ce8f372e6590bb068f17510ed5be6a33048bb9e 100644 (file)
@@ -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)
index 56d56df676d1649c50cce3dd35eab89d3b60365f..0e42414f7f18af485f7a34e6a4f46cb76679ac7c 100644 (file)
@@ -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,