mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
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
This commit is contained in:
parent
b1099a5b56
commit
7d0f04a651
@ -137,11 +137,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
|
||||
|
@ -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 ||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user