diff options
Diffstat (limited to 'cgi-bin/admin.c')
-rw-r--r-- | cgi-bin/admin.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cgi-bin/admin.c b/cgi-bin/admin.c index cecbba418..5589c1155 100644 --- a/cgi-bin/admin.c +++ b/cgi-bin/admin.c @@ -1348,20 +1348,20 @@ do_am_printer(http_t *http, /* I - HTTP connection */ ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri); - ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-location", - NULL, cgiGetVariable("PRINTER_LOCATION")); - - ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-info", - NULL, cgiGetVariable("PRINTER_INFO")); - if (!file) { var = cgiGetVariable("PPD_NAME"); if (strcmp(var, "__no_change__")) - ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_NAME, "ppd-name", + ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name", NULL, var); } + ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-location", + NULL, cgiGetVariable("PRINTER_LOCATION")); + + ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-info", + NULL, cgiGetVariable("PRINTER_INFO")); + strlcpy(uri, cgiGetVariable("DEVICE_URI"), sizeof(uri)); /* |