torture4: Allow DBG output in libsmbclient tests
authorVolker Lendecke <vl@samba.org>
Tue, 31 Mar 2020 06:32:10 +0000 (08:32 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 8 Apr 2020 14:46:39 +0000 (14:46 +0000)
smbc_new_context() overwrites the global DEBUGLEVEL to 0.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source4/torture/libsmbclient/libsmbclient.c

index c1508680d99a87031a1d843916a06d2005dd888c..6e64a783d58dc8fe8fb2bf92cf4f7595c9106603 100644 (file)
@@ -89,6 +89,7 @@ bool torture_libsmbclient_init_context(struct torture_context *tctx,
        SMBCCTX *ctx = NULL;
        SMBCCTX *p = NULL;
        bool ok = true;
+       int dbglevel = DEBUGLEVEL;
 
        ctx = smbc_new_context();
        torture_assert_not_null_goto(tctx,
@@ -104,7 +105,7 @@ bool torture_libsmbclient_init_context(struct torture_context *tctx,
                                     out,
                                     "Failed to initialize context");
 
-       smbc_setDebug(ctx, DEBUGLEVEL);
+       smbc_setDebug(ctx, dbglevel);
        smbc_setOptionDebugToStderr(ctx, 1);
 
        if (workgroup != NULL) {