[SCM] Samba Shared Repository - branch v3-6-test updated

Günther Deschner gd at samba.org
Wed May 11 03:47:59 MDT 2011


The branch, v3-6-test has been updated
       via  44a454f s3-printing: make cups_pull_comment_location() work again.
      from  25d7736 s3-printing: Fix double free of cups request.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit 44a454fe5f1873902995fde1618039092a9b6701
Author: Günther Deschner <gd at samba.org>
Date:   Wed May 11 10:30:42 2011 +0200

    s3-printing: make cups_pull_comment_location() work again.
    
    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 at samba.org>
    Autobuild-Date: Wed May 11 11:36:07 CEST 2011 on sn-devel-104
    (cherry picked from commit f99d6f079a0060e4d08d7384bdf230d4d2c62b86)

-----------------------------------------------------------------------

Summary of changes:
 source3/printing/print_cups.c |   15 ++-------------
 1 files changed, 2 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/printing/print_cups.c b/source3/printing/print_cups.c
index ea2fc1d..077d82b 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);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list