diff options
Diffstat (limited to 'source3/libsmb/libsmb_setget.c')
-rw-r--r-- | source3/libsmb/libsmb_setget.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/libsmb/libsmb_setget.c b/source3/libsmb/libsmb_setget.c index f2f5aec6c46..0d260d7cf29 100644 --- a/source3/libsmb/libsmb_setget.c +++ b/source3/libsmb/libsmb_setget.c @@ -120,10 +120,18 @@ smbc_setTimeout(SMBCCTX *c, int timeout) smbc_bool smbc_getOptionDebugToStderr(SMBCCTX *c) { - return c->internal->debug_stderr; + /* Because this is a global concept, it is better to check + * what is really set, rather than what we wanted set + * (particularly as you cannot go back to stdout). */ + return debug_get_output_is_stderr(); } -/** Set whether to log to standard error instead of standard output */ +/** Set whether to log to standard error instead of standard output. + * This option is 'sticky' - once set to true, it cannot be set to + * false again, as it is global to the process, as once we have been + * told that it is not safe to safe to write to stdout, we shouldn't + * go back as we don't know it was this context that set it that way. + */ void smbc_setOptionDebugToStderr(SMBCCTX *c, smbc_bool b) { |