From f99d6f079a0060e4d08d7384bdf230d4d2c62b86 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 11 May 2011 10:30:42 +0200 Subject: s3-printing: make cups_pull_comment_location() work again. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 --- source3/printing/print_cups.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'source3/printing') diff --git a/source3/printing/print_cups.c b/source3/printing/print_cups.c index ea2fc1d7c4..077d82bcbf 100644 --- a/source3/printing/print_cups.c +++ b/source3/printing/print_cups.c @@ -1585,7 +1585,6 @@ bool cups_pull_comment_location(TALLOC_CTX *mem_ctx, 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 */ @@ -1626,21 +1625,11 @@ bool cups_pull_comment_location(TALLOC_CTX *mem_ctx, 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, printername, &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); -- cgit