[SCM] Samba Shared Repository - branch master updated -
release-4-0-0alpha7-1605-ga13ba43
Derrell Lipman
derrell at samba.org
Wed May 13 18:52:15 GMT 2009
The branch, master has been updated
via a13ba4347f92afc63497991210bc59e6bd2434d0 (commit)
from 636fbd1028bf22d9a93ae5029f6881e144f58fe1 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit a13ba4347f92afc63497991210bc59e6bd2434d0
Author: Derrell Lipman <derrell at dworkin.(none)>
Date: Wed May 13 14:51:43 2009 -0400
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
-----------------------------------------------------------------------
Summary of changes:
source3/libsmb/libsmb_context.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c
index 03cd00d..bacd907 100644
--- a/source3/libsmb/libsmb_context.c
+++ b/source3/libsmb/libsmb_context.c
@@ -48,13 +48,6 @@ SMBC_module_init(void * punused)
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 ... */
lp_set_in_client(True);
@@ -553,6 +546,16 @@ smbc_init_context(SMBCCTX *context)
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) &&
!smbc_getFunctionAuthDataWithContext(context)) ||
smbc_getDebug(context) < 0 ||
--
Samba Shared Repository
More information about the samba-cvs
mailing list