diff options
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/libsmb_context.c | 11 | ||||
-rw-r--r-- | source3/libsmb/libsmb_setget.c | 11 |
2 files changed, 10 insertions, 12 deletions
diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c index 22e0a04717..6b56e45398 100644 --- a/source3/libsmb/libsmb_context.c +++ b/source3/libsmb/libsmb_context.c @@ -555,17 +555,6 @@ smbc_init_context(SMBCCTX *context) return NULL; } - if (context->internal->debug_stderr) { - /* - * We do not have a unique per-thread debug state? For - * now, we'll just leave it up to the user. If any one - * context spefies debug to stderr then all will be (and - * will stay that way, as it is unsafe to flip back if - * stdout is in use for other things) - */ - setup_logging("libsmbclient", DEBUG_STDERR); - } - if ((!smbc_getFunctionAuthData(context) && !smbc_getFunctionAuthDataWithContext(context)) || smbc_getDebug(context) < 0 || diff --git a/source3/libsmb/libsmb_setget.c b/source3/libsmb/libsmb_setget.c index 0d260d7cf2..0a02346752 100644 --- a/source3/libsmb/libsmb_setget.c +++ b/source3/libsmb/libsmb_setget.c @@ -135,7 +135,16 @@ smbc_getOptionDebugToStderr(SMBCCTX *c) void smbc_setOptionDebugToStderr(SMBCCTX *c, smbc_bool b) { - c->internal->debug_stderr = b; + if (b) { + /* + * We do not have a unique per-thread debug state? For + * now, we'll just leave it up to the user. If any one + * context spefies debug to stderr then all will be (and + * will stay that way, as it is unsafe to flip back if + * stdout is in use for other things) + */ + setup_logging("libsmbclient", DEBUG_STDERR); + } } /** |