diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-10-29 14:19:32 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-11-02 04:36:04 +0000 |
commit | 9da4ace1d9789d300ab298bc34694c44b2062f30 (patch) | |
tree | 0c4ce1fa4f3a97934c9504263fdfc86a28e39705 /source3/client/client.c | |
parent | 4ae27891f8ac0a56d68b0544e78d6c17ade0c1c9 (diff) | |
download | samba-9da4ace1d9789d300ab298bc34694c44b2062f30.tar.gz samba-9da4ace1d9789d300ab298bc34694c44b2062f30.tar.bz2 samba-9da4ace1d9789d300ab298bc34694c44b2062f30.zip |
s3-debug Impove setup_logging() to specify logging to stderr
This change improves the setup_logging() API so that callers which
wish to set up logging to stderr can simply ask for it, rather than
directly modify the dbf global variable.
Andrew Bartlett
Diffstat (limited to 'source3/client/client.c')
-rw-r--r-- | source3/client/client.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 9c02879938..a7c09cf6c5 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -5046,11 +5046,8 @@ static int do_message_op(struct user_auth_info *a_info) set_global_myname( "" ); /* set default debug level to 1 regardless of what smb.conf sets */ - setup_logging( "smbclient", true ); + setup_logging( "smbclient", DEBUG_DEFAULT_STDERR ); DEBUGLEVEL_CLASS[DBGC_ALL] = 1; - if ((dbf = x_fdup(x_stderr))) { - x_setbuf( dbf, NULL ); - } load_case_tables(); @@ -5119,10 +5116,7 @@ static int do_message_op(struct user_auth_info *a_info) } break; case 'E': - if (dbf) { - x_fclose(dbf); - } - dbf = x_stderr; + setup_logging("smbclient", DEBUG_STDERR ); display_set_stderr(); break; @@ -5215,7 +5209,7 @@ static int do_message_op(struct user_auth_info *a_info) } if ( override_logfile ) - setup_logging( lp_logfile(), false ); + setup_logging( lp_logfile(), DEBUG_FILE ); if (!lp_load(get_dyn_CONFIGFILE(),true,false,false,true)) { fprintf(stderr, "%s: Can't load %s - run testparm to debug it\n", |