mirror of
https://github.com/samba-team/samba.git
synced 2025-03-10 12:58:35 +03:00
What to do about debugging in a multi-threaded application?
- For now, punt. Any thread that requests debug to stderr will establish that for all threads. Derrell
This commit is contained in:
parent
636fbd1028
commit
a13ba4347f
@ -48,13 +48,6 @@ SMBC_module_init(void * punused)
|
|||||||
|
|
||||||
setup_logging("libsmbclient", True);
|
setup_logging("libsmbclient", True);
|
||||||
|
|
||||||
#if 0 /* need a place to put this (thread local storage) */
|
|
||||||
if (context->internal->debug_stderr) {
|
|
||||||
dbf = x_stderr;
|
|
||||||
x_setbuf(x_stderr, NULL);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Here we would open the smb.conf file if needed ... */
|
/* Here we would open the smb.conf file if needed ... */
|
||||||
|
|
||||||
lp_set_in_client(True);
|
lp_set_in_client(True);
|
||||||
@ -553,6 +546,16 @@ smbc_init_context(SMBCCTX *context)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (context->internal->debug_stderr) {
|
||||||
|
/*
|
||||||
|
* Hmmm... Do we want a unique dbf per-thread? For now, we'll just
|
||||||
|
* leave it up to the user. If any one context spefies debug to
|
||||||
|
* stderr then all will be.
|
||||||
|
*/
|
||||||
|
dbf = x_stderr;
|
||||||
|
x_setbuf(x_stderr, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
if ((!smbc_getFunctionAuthData(context) &&
|
if ((!smbc_getFunctionAuthData(context) &&
|
||||||
!smbc_getFunctionAuthDataWithContext(context)) ||
|
!smbc_getFunctionAuthDataWithContext(context)) ||
|
||||||
smbc_getDebug(context) < 0 ||
|
smbc_getDebug(context) < 0 ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user