]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix device URI when adding or modifying a printer (Issue #998)
authorMichael R Sweet <msweet@msweet.org>
Wed, 14 Aug 2024 00:27:17 +0000 (20:27 -0400)
committerMichael R Sweet <msweet@msweet.org>
Wed, 14 Aug 2024 00:27:17 +0000 (20:27 -0400)
CHANGES.md
cgi-bin/admin.c

index 6b8f9d776a6ed2622147e8e9e7fc76557fc70b22..219a6761461fd0096fd8510304772d7a09e0dca9 100644 (file)
@@ -7,6 +7,7 @@ Changes in CUPS v2.4.11 (YYYY-MM-DD)
 
 - Updated the maximum file descriptor limit for `cupsd` to 64k-1 (Issue #989)
 - Fixed incorrect error message for HTTP/IPP errors (Issue #893)
+- Fixed adding and modifying of printers via the web interface (Issue #998)
 - Fixed checkbox support (Issue #1008)
 - Fixed printer state notifications (Issue #1013)
 
index dfc33254c8e94a5e3f1514839815cba6126ad99d..90f0e2b6c1292630c11a8454806f2cf4854861f6 100644 (file)
@@ -636,7 +636,7 @@ do_am_printer(http_t *http,         /* I - HTTP connection */
                };
 
 
-  ptr = cgiGetTextfield("DEVICE_URI");
+  ptr = cgiGetVariable("DEVICE_URI");
   fprintf(stderr, "DEBUG: do_am_printer: DEVICE_URI=\"%s\"\n",
           ptr ? ptr : "(null)");
 
@@ -697,7 +697,7 @@ do_am_printer(http_t *http,         /* I - HTTP connection */
     }
   }
 
-  if ((var = cgiGetTextfield("DEVICE_URI")) != NULL)
+  if ((var = cgiGetVariable("DEVICE_URI")) != NULL)
   {
     if ((uriptr = strrchr(var, '|')) != NULL)
     {
@@ -1130,7 +1130,7 @@ do_am_printer(http_t *http,               /* I - HTTP connection */
     ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-info",
                  NULL, cgiGetTextfield("PRINTER_INFO"));
 
-    strlcpy(uri, cgiGetTextfield("DEVICE_URI"), sizeof(uri));
+    strlcpy(uri, cgiGetVariable("DEVICE_URI"), sizeof(uri));
 
    /*
     * Strip make and model from URI...