diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-05-24 09:57:48 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-05-24 09:57:48 +0000 |
commit | 98d5699d28c687f8af5671c9a29aa55dd5a01bfd (patch) | |
tree | 0e95ed256cb1c37b2ad22d5d5e71c37bba49bfcc /source3/utils/net.c | |
parent | f5adb7909306b247695024dd7803353fa536a09a (diff) | |
download | samba-98d5699d28c687f8af5671c9a29aa55dd5a01bfd.tar.gz samba-98d5699d28c687f8af5671c9a29aa55dd5a01bfd.tar.bz2 samba-98d5699d28c687f8af5671c9a29aa55dd5a01bfd.zip |
Some of the updates from ctrlsoft's 'Various' patch:
- convert net to popt
- convert status to popt
- adapt examples/pdb/ to multiple passdb system
- add dynamic debug class example to examples/pdb/
and some reformatting to better match the samba coding style.
Andrew Bartlett
(This used to be commit 2498bc69d4e5c38ec385f640489daa94c508c726)
Diffstat (limited to 'source3/utils/net.c')
-rw-r--r-- | source3/utils/net.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source3/utils/net.c b/source3/utils/net.c index fc5c6b90d5..b6998efdf7 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -77,6 +77,7 @@ BOOL opt_have_ip = False; struct in_addr opt_dest_ip; extern pstring global_myname; +extern BOOL AllowDebugChange; /* run a function from a function table. If not found then @@ -356,7 +357,7 @@ static struct functable net_func[] = { const char ** argv_new; poptContext pc; static char *servicesf = dyn_CONFIGFILE; - static int debuglevel = 0; + static char *debuglevel = NULL; struct poptOption long_options[] = { {"help", 'h', POPT_ARG_NONE, 0, 'h'}, @@ -367,8 +368,8 @@ static struct functable net_func[] = { {"port", 'p', POPT_ARG_INT, &opt_port}, {"myname", 'n', POPT_ARG_STRING, &opt_requester_name}, {"conf", 's', POPT_ARG_STRING, &servicesf}, - {"debug", 'd', POPT_ARG_INT, &debuglevel}, - {"debuglevel", 'd', POPT_ARG_INT, &debuglevel}, + {"debug", 'd', POPT_ARG_STRING, &debuglevel}, + {"debuglevel", 'd', POPT_ARG_STRING, &debuglevel}, {"server", 'S', POPT_ARG_STRING, &opt_host}, {"comment", 'C', POPT_ARG_STRING, &opt_comment}, {"maxusers", 'M', POPT_ARG_INT, &opt_maxusers}, @@ -416,9 +417,12 @@ static struct functable net_func[] = { } } - lp_load(servicesf,True,False,False); + if (debuglevel) { + debug_parse_levels(debuglevel); + AllowDebugChange = False; + } - DEBUGLEVEL = debuglevel; + lp_load(servicesf,True,False,False); argv_new = (const char **)poptGetArgs(pc); |