From 69b4adc4d90b3a7625c090d09b58becfefe550dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Wed, 11 May 2011 10:30:42 +0200 Subject: [PATCH] s3-printing: make cups_pull_comment_location() work again. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit we deal with lp_cups_server in cups_connect() already, inside the URI all our other cups functions we use ipp://localhost, do the same here. Guenther Autobuild-User: Günther Deschner Autobuild-Date: Wed May 11 11:36:07 CEST 2011 on sn-devel-104 The last 3 patches address bug #8132 (Samba does not fill printers Location field when using cups). (cherry picked from commit 392d6b2ab8dcde4176a6e872699a5a076ab92068) --- source3/printing/print_cups.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/source3/printing/print_cups.c b/source3/printing/print_cups.c index b41cd34c42d..6e8cc12e625 100644 --- a/source3/printing/print_cups.c +++ b/source3/printing/print_cups.c @@ -1640,7 +1640,6 @@ bool cups_pull_comment_location(NT_PRINTER_INFO_LEVEL_2 *printer) ipp_attribute_t *attr; /* Current attribute */ cups_lang_t *language = NULL; /* Default language */ char uri[HTTP_MAX_URI]; - char *server = NULL; char *sharename = NULL; char *name = NULL; static const char *requested[] =/* Requested attributes */ @@ -1681,21 +1680,11 @@ bool cups_pull_comment_location(NT_PRINTER_INFO_LEVEL_2 *printer) ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, language->language); - if (lp_cups_server() != NULL && strlen(lp_cups_server()) > 0) { - if (!push_utf8_talloc(frame, &server, lp_cups_server(), &size)) { - goto out; - } - } else { - server = talloc_strdup(frame,cupsServer()); - } - if (!server) { - goto out; - } if (!push_utf8_talloc(frame, &sharename, printer->sharename, &size)) { goto out; } - slprintf(uri, sizeof(uri) - 1, "ipp://%s/printers/%s", - server, sharename); + slprintf(uri, sizeof(uri) - 1, "ipp://localhost/printers/%s", + sharename); ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri); -- 2.11.4.GIT