Author: tjansen Date: Mon Sep 28 16:28:07 2009 New Revision: 992 Log: Fixed the bug that all daemons ignored the -b command line option. Initialization of the context structure has to be done before command line parsing. Otherwise command line options will have no effect. Modified: trunk/pisacd/cdmain.c trunk/pisand/ndmain.c trunk/pisasd/sdmain.c Modified: trunk/pisacd/cdmain.c ============================================================================== --- trunk/pisacd/cdmain.c Fri Sep 25 18:35:20 2009 (r991) +++ trunk/pisacd/cdmain.c Mon Sep 28 16:28:07 2009 (r992) @@ -153,6 +153,8 @@ signal(SIGBUS, cd_quit); signal(SIGALRM, cd_handle_sigalarm); + cdctx_init(&cd_ctx); + /* Receive and parse command line arguments. * Note that command line args must be obtained before calling any * cdconf_* operations. */ @@ -164,9 +166,8 @@ exit(EXIT_FAILURE); } - /* Initialize general client daemon context info & configurations */ + /* Initialize general client daemon configurations */ cdconf_init(&cd_cfg); - cdctx_init(&cd_ctx); #ifdef CONFIG_PISA_PERFORMANCE cd_perf_init(); Modified: trunk/pisand/ndmain.c ============================================================================== --- trunk/pisand/ndmain.c Fri Sep 25 18:35:20 2009 (r991) +++ trunk/pisand/ndmain.c Mon Sep 28 16:28:07 2009 (r992) @@ -137,6 +137,8 @@ signal(SIGSEGV, nd_quit); signal(SIGALRM, nd_handle_sigalarm); + ndctx_init(&nd_ctx); + /* Receive and parse command line arguments. * Note that command line args must be obtained before calling any * ndconf_* operations. */ @@ -148,9 +150,8 @@ exit(EXIT_FAILURE); } - /* Initialize general neighbor daemon context info & configurations */ + /* Initialize general neighbor daemon configurations */ ndconf_init(&nd_cfg); - ndctx_init(&nd_ctx); nd_perf_init(); Modified: trunk/pisasd/sdmain.c ============================================================================== --- trunk/pisasd/sdmain.c Fri Sep 25 18:35:20 2009 (r991) +++ trunk/pisasd/sdmain.c Mon Sep 28 16:28:07 2009 (r992) @@ -173,6 +173,8 @@ signal(SIGBUS, sd_quit); signal(SIGALRM, sd_handle_sigalarm); + sdctx_init(&sd_ctx); + /* Receive and parse command line arguments. * Note that command line args must be obtained before calling any * sdconf_* operations. */ @@ -184,9 +186,8 @@ exit(EXIT_FAILURE); } - /* Initialize general server daemon context info & configurations */ + /* Initialize general server daemon configurations */ sdconf_init(&sd_cfg); - sdctx_init(&sd_ctx); sd_perf_init();