From 660fa6632e810aa37e5e8b8b91c2456cfc1561a3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 25 Nov 2001 13:36:02 +0000 Subject: portability fixes (This used to be commit 09127d85dc91037c9d0280b57d48d23e93a39f8b) --- source3/utils/net.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source3/utils') diff --git a/source3/utils/net.c b/source3/utils/net.c index d4f203c1d5..224de31ebf 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -1251,8 +1251,9 @@ int main(int argc,char *argv[]) int argc_new = 0; const char ** argv_new; poptContext pc; - char *servicesf = dyn_CONFIGFILE; + static char *servicesf = dyn_CONFIGFILE; extern pstring global_myname; + static int debuglevel; struct poptOption long_options[] = { {"help", 'h', POPT_ARG_NONE, 0, 'h'}, @@ -1263,8 +1264,8 @@ int main(int argc,char *argv[]) {"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, 'd'}, - {"debuglevel", 'd', POPT_ARG_INT, &DEBUGLEVEL, 'd'}, + {"debug", 'd', POPT_ARG_INT, &debuglevel, 'd'}, + {"debuglevel", 'd', POPT_ARG_INT, &debuglevel, 'd'}, {"server", 'S', POPT_ARG_STRING, &opt_host}, {"comment", 'C', POPT_ARG_STRING, &opt_comment}, {"maxusers", 'M', POPT_ARG_INT, &opt_maxusers}, @@ -1310,6 +1311,8 @@ int main(int argc,char *argv[]) } } + DEBUGLEVEL = debuglevel; + lp_load(servicesf,True,False,False); argv_new = (const char **)poptGetArgs(pc); -- cgit