s3-printing: make cups_pull_comment_location() work again.
authorGünther Deschner <gd@samba.org>
Wed, 11 May 2011 08:30:42 +0000 (10:30 +0200)
committerGünther Deschner <gd@samba.org>
Wed, 11 May 2011 09:36:07 +0000 (11:36 +0200)
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 <gd@samba.org>
Autobuild-Date: Wed May 11 11:36:07 CEST 2011 on sn-devel-104

source3/printing/print_cups.c

index ea2fc1d7c4983397fb934994b8e5c31d21b3ee5d..077d82bcbfbd0da9b9128b6baa1858d6dd0e21eb 100644 (file)
@@ -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);