The branch, master has been updated
       via  4721be488ceb8229d564e4b63ca9937603394e51 (commit)
      from  ca3de0103b545c86c8507dfc7d042f1838d5dfb2 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 4721be488ceb8229d564e4b63ca9937603394e51
Author: Günther Deschner <[email protected]>
Date:   Tue Apr 14 23:19:25 2009 +0200

    s3-spoolss: Fix format of description string in spoolss_PrinterInfo1.
    
    This is what windows does and should get us closer to show the appropriate
    printer location string in explorer.
    
    Guenther

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

Summary of changes:
 source3/rpc_server/srv_spoolss_nt.c |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index effbb92..d114152 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -4128,25 +4128,21 @@ static WERROR construct_printer_info1(TALLOC_CTX 
*mem_ctx,
                                      struct spoolss_PrinterInfo1 *r,
                                      int snum)
 {
-       char *chaine = NULL;
        r->flags                = flags;
 
+       r->description          = talloc_asprintf(mem_ctx, "%s,%s,%s",
+                                                 
ntprinter->info_2->printername,
+                                                 ntprinter->info_2->drivername,
+                                                 ntprinter->info_2->location);
+       W_ERROR_HAVE_NO_MEMORY(r->description);
+
        if (*ntprinter->info_2->comment == '\0') {
                r->comment      = talloc_strdup(mem_ctx, lp_comment(snum));
-               chaine = talloc_asprintf(mem_ctx,
-                               "%s,%s,%s", ntprinter->info_2->printername,
-                               ntprinter->info_2->drivername, 
lp_comment(snum));
        } else {
                r->comment      = talloc_strdup(mem_ctx, 
ntprinter->info_2->comment); /* saved comment */
-               chaine = talloc_asprintf(mem_ctx,
-                               "%s,%s,%s", ntprinter->info_2->printername,
-                               ntprinter->info_2->drivername, 
ntprinter->info_2->comment);
        }
-       W_ERROR_HAVE_NO_MEMORY(chaine);
        W_ERROR_HAVE_NO_MEMORY(r->comment);
 
-       r->description          = talloc_strdup(mem_ctx, chaine);
-       W_ERROR_HAVE_NO_MEMORY(r->description);
        r->name                 = talloc_strdup(mem_ctx, 
ntprinter->info_2->printername);
        W_ERROR_HAVE_NO_MEMORY(r->name);
 


-- 
Samba Shared Repository

Reply via email to