summaryrefslogtreecommitdiff
path: root/source3/client/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/client/client.c')
-rw-r--r--source3/client/client.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 3ce635fbeb..ef942c9867 100644
--- a/source3/client/client.c
+++ b/source3/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);