summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-11-01 20:55:04 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-11-02 04:36:04 +0000
commitb1099a5b560db0145534ed6484eee27c7d93528a (patch)
treebd775f2d2fe46eb61b0d4306c9f4736f6996c189 /source3/lib
parente16c9904c60bd7531ada1acd2396e56ee1213dea (diff)
downloadsamba-b1099a5b560db0145534ed6484eee27c7d93528a.tar.gz
samba-b1099a5b560db0145534ed6484eee27c7d93528a.tar.bz2
samba-b1099a5b560db0145534ed6484eee27c7d93528a.zip
s3-libsmbclient Add comments to describe the behaviour of DEBUG()
This isn't quite what you would expect from this interface, but actually avoids some really nasty situations if you ever have more than one libsmbclient context in a process. In the real world, if you have asked for DEBUG() to stderr in one part of the code, you will want it globally, even in a different thread (which in the past would have rest everything to stdout again, at least while starting up). Andrew Bartlett
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/debug.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/lib/debug.c b/source3/lib/debug.c
index f9f4cae000..a97c0bf923 100644
--- a/source3/lib/debug.c
+++ b/source3/lib/debug.c
@@ -614,6 +614,11 @@ static void debug_close_fd(int fd)
}
}
+bool debug_get_output_is_stderr(void)
+{
+ return (state.logtype == DEBUG_DEFAULT_STDERR) || (state.logtype == DEBUG_STDERR);
+}
+
/**************************************************************************
reopen the log files
note that we now do this unconditionally