The branch, v3-5-test has been updated
       via  392d6b2 s3-printing: make cups_pull_comment_location() work again.
       via  5d503c7 s3-printing: Fix double free of cups request.
       via  04e820e s3-printing: very obvious fix for 
cups_pull_comment_location().
      from  12bb20a s3-libsmb Don't ever ask for machine$ principals as a 
target.

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


- Log -----------------------------------------------------------------
commit 392d6b2ab8dcde4176a6e872699a5a076ab92068
Author: Günther Deschner <[email protected]>
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 <[email protected]>
    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).

commit 5d503c7e8927f2bdb252f2293e53b7e87f2d3cb5
Author: Günther Deschner <[email protected]>
Date:   Tue May 10 15:49:05 2011 +0200

    s3-printing: Fix double free of cups request.
    
    We never free the request in our cups api usage except for here. The reason 
is
    probably htis (from the cupsDoConnect API docs):
    
    "This function sends the IPP request to the specified server, retrying and
    authenticating as necessary. The request is freed with ippDelete() after
    receiving a valid IPP response."
    
    Revert "Fix a memory leak in cups_pull_comment_location"
    
    This reverts commit fee2664dad37536b05ce8bdae3e74d45b257f632.
    
    Autobuild-User: Günther Deschner <[email protected]>
    Autobuild-Date: Tue May 10 17:32:58 CEST 2011 on sn-devel-104
    (cherry picked from commit 019f11dd5b3240d05c1abe30dec3d793d6919313)

commit 04e820ef17e5a9df90ff8b7744bf9cce5a00ae05
Author: Günther Deschner <[email protected]>
Date:   Tue May 10 15:48:25 2011 +0200

    s3-printing: very obvious fix for cups_pull_comment_location().
    
    This has been in there since 2008...
    
    Guenther
    (cherry picked from commit 3ba3f68e03510e3bb5b7627c200af0395e853bc2)

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

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


Changeset truncated at 500 lines:

diff --git a/source3/printing/print_cups.c b/source3/printing/print_cups.c
index 4c24e44..6e8cc12 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);
@@ -1796,10 +1785,6 @@ bool cups_pull_comment_location(NT_PRINTER_INFO_LEVEL_2 
*printer)
        if (response)
                ippDelete(response);
 
-       if (request) {
-               ippDelete(request);
-       }
-
        if (language)
                cupsLangFree(language);
 


-- 
Samba Shared Repository

Reply via email to