From 7d0f04a651e4bed7e1e6d587a1bdaf3cfa6f9e33 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 2 Nov 2010 15:32:16 +1100 Subject: s3-libsmbclient Don't store 'debug_stderr' on the libsmbclient context Following the review of this patch series by Derrell Lipman, remove the seperate storage of the debug_stderr variable from the libsmbclient SMBC_internal_data context. Andrew Bartlett --- source3/libsmb/libsmb_setget.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'source3/libsmb/libsmb_setget.c') 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); + } } /** -- cgit