From 6a3394a285a250d1029cdd545dd0bf832284555a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 26 Mar 1998 19:11:31 +0000 Subject: client.c: Fixed problem where debug level on command line was overridden by smb.conf. smbpasswd.c: Removed bugs I put in yesterday (thanks Luke :-) and added error message reporting for remote password changing. Jeremy. --- source/client/client.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'source/client') diff --git a/source/client/client.c b/source/client/client.c index 3ce635fbeb2..ef942c98672 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -3531,6 +3531,7 @@ static void usage(char *pname) pstring term_code; pstring new_name_resolve_order; char *p; + int save_debuglevel = -1; #ifdef KANJI strcpy(term_code, KANJI); @@ -3709,9 +3710,9 @@ static void usage(char *pname) break; case 'd': if (*optarg == 'A') - DEBUGLEVEL = 10000; + save_debuglevel = DEBUGLEVEL = 10000; else - DEBUGLEVEL = atoi(optarg); + save_debuglevel = DEBUGLEVEL = atoi(optarg); break; case 'l': sprintf(debugf,"%s.client",optarg); @@ -3756,6 +3757,14 @@ static void usage(char *pname) fprintf(stderr, "Can't load %s - run testparm to debug it\n", servicesf); } + /* + * We need to reset the global debuglevel here, as + * lp_load will reset it from smb.conf. + */ + + if(save_debuglevel != -1) + DEBUGLEVEL = save_debuglevel; + codepage_initialise(lp_client_code_page()); interpret_coding_system(term_code); -- cgit