summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-11-02 15:32:16 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-11-02 04:36:05 +0000
commit7d0f04a651e4bed7e1e6d587a1bdaf3cfa6f9e33 (patch)
tree4f197c631747f7528a771e7f72bf6a5b0eaf9b27 /source3
parentb1099a5b560db0145534ed6484eee27c7d93528a (diff)
downloadsamba-7d0f04a651e4bed7e1e6d587a1bdaf3cfa6f9e33.tar.gz
samba-7d0f04a651e4bed7e1e6d587a1bdaf3cfa6f9e33.tar.bz2
samba-7d0f04a651e4bed7e1e6d587a1bdaf3cfa6f9e33.zip
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
Diffstat (limited to 'source3')
-rw-r--r--source3/include/libsmb_internal.h5
-rw-r--r--source3/libsmb/libsmb_context.c11
-rw-r--r--source3/libsmb/libsmb_setget.c11
3 files changed, 10 insertions, 17 deletions
diff --git a/source3/include/libsmb_internal.h b/source3/include/libsmb_internal.h
index 0bfcd8fab7..39a32f99fb 100644
--- a/source3/include/libsmb_internal.h
+++ b/source3/include/libsmb_internal.h
@@ -138,11 +138,6 @@ struct SMBC_internal_data {
SMBCFILE * files;
/*
- * Log to standard error instead of the more typical standard output
- */
- bool debug_stderr;
-
- /*
* Support "Create Time" in get/set with the *xattr() functions, if
* true. This replaces the dos attribute strings C_TIME, A_TIME and
* M_TIME with CHANGE_TIME, ACCESS_TIME and WRITE_TIME, and adds
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);
+ }
}
/**