Commit c407379a authored by Shane Snyder's avatar Shane Snyder
Browse files

bug fix in initializing static modules

parent 30c06099
...@@ -271,14 +271,6 @@ void darshan_core_initialize(int argc, char **argv) ...@@ -271,14 +271,6 @@ void darshan_core_initialize(int argc, char **argv)
/* collect information about command line and mounted file systems */ /* collect information about command line and mounted file systems */
darshan_get_exe_and_mounts(init_core, argc, argv); darshan_get_exe_and_mounts(init_core, argc, argv);
/* bootstrap any modules with static initialization routines */
i = 0;
while(mod_static_init_fns[i])
{
(*mod_static_init_fns[i])();
i++;
}
darshan_core = init_core; darshan_core = init_core;
} }
} }
...@@ -295,10 +287,21 @@ void darshan_core_initialize(int argc, char **argv) ...@@ -295,10 +287,21 @@ void darshan_core_initialize(int argc, char **argv)
} }
} }
/* if darshan was successfully initialized, set the global pointer */ /* if darshan was successfully initialized, set the global pointer and
* bootstrap any modules with static initialization routines
*/
if(init_core) if(init_core)
{
darshan_core = init_core; darshan_core = init_core;
i = 0;
while(mod_static_init_fns[i])
{
(*mod_static_init_fns[i])();
i++;
}
}
return; return;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment