[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-2767-gc6ca0f7

Karolin Seeger kseeger at samba.org
Fri Jul 25 07:54:08 GMT 2008


The branch, v3-2-test has been updated
       via  c6ca0f7d462c51122ccb1068306410ccdbee7b00 (commit)
      from  7f749a10eff0bb469e6eb50b02cb60fd65c23f9e (commit)

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


- Log -----------------------------------------------------------------
commit c6ca0f7d462c51122ccb1068306410ccdbee7b00
Author: Karolin Seeger <kseeger at samba.org>
Date:   Wed Jul 23 17:07:56 2008 +0200

    talloc_string_sub2: Don't return NULL if src is empty.
    
    This fixes BUG #5635.
    
    Finished print jobs were not removed from the $PRINTER.tdb file if
    "printing=cups".
    
    In print_queue_update, talloc_string_sub2 is used to assemble the
    "lprm command". In the case of using "printing=cups", the default
    "lprm command" is an empty string. talloc_string_sub2 is called with
    this empty string and returns NULL which leads to exiting
    print_queue_update without doing the actual print queue update.
    
    Signed-off by Michael Adam <obnox at samba.org>
    (cherry picked from commit 03d66554d1bbd9d6c72a3dd5203e5305343c76b8)

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

Summary of changes:
 source/lib/util_str.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/util_str.c b/source/lib/util_str.c
index 6678c0c..c36d512 100644
--- a/source/lib/util_str.c
+++ b/source/lib/util_str.c
@@ -1231,7 +1231,7 @@ char *talloc_string_sub2(TALLOC_CTX *mem_ctx, const char *src,
 	char *string;
 	ssize_t ls,lp,li,ld, i;
 
-	if (!insert || !pattern || !*pattern || !src || !*src) {
+	if (!insert || !pattern || !*pattern || !src) {
 		return NULL;
 	}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list