]> 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:26:09 +0000 (20:26 -0400)
committerMichael R Sweet <msweet@msweet.org>
Wed, 14 Aug 2024 00:26:09 +0000 (20:26 -0400)
cgi-bin/admin.c

index 62e1c8fd0edbb2c054f25f9519a704868eb5789a..0032fbd5aa791739a8986b98613023860c0e080f 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"));
 
-    cupsCopyString(uri, cgiGetTextfield("DEVICE_URI"), sizeof(uri));
+    cupsCopyString(uri, cgiGetVariable("DEVICE_URI"), sizeof(uri));
 
    /*
     * Strip make and model from URI...