From b0f269389e87634e85c0a4752239e859b732188f Mon Sep 17 00:00:00 2001 From: msweet Date: Fri, 18 Oct 2013 21:14:44 +0000 Subject: [PATCH] The lpadmin command did not send the PPD name from the "-m" option () git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11344 a1ca3aef-8c08-0410-bb20-df032aa958be --- CHANGES-1.7.txt | 2 ++ cgi-bin/admin.c | 14 +++++++------- systemv/lpadmin.c | 1 + 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CHANGES-1.7.txt b/CHANGES-1.7.txt index 3a5ef5bc1..ca4af37f0 100644 --- a/CHANGES-1.7.txt +++ b/CHANGES-1.7.txt @@ -4,6 +4,8 @@ CHANGES-1.7.txt CHANGES IN CUPS V1.7.0 - Updated the Japanese localization. + - The lpadmin command did not send the PPD name from the "-m" option + () - Network backends now use the prtMarkerSuppliesClass property to determine the direction of supply level values () 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)); /* diff --git a/systemv/lpadmin.c b/systemv/lpadmin.c index d954e75fb..a0ed62c6c 100644 --- a/systemv/lpadmin.c +++ b/systemv/lpadmin.c @@ -1295,6 +1295,7 @@ set_printer_options( * Add the options... */ + cupsEncodeOptions2(request, num_options, options, IPP_TAG_OPERATION); cupsEncodeOptions2(request, num_options, options, IPP_TAG_PRINTER); if ((protocol = cupsGetOption("protocol", num_options, options)) != NULL) -- 2.39.5