Commit ff6d47bb authored by Pietro Fezzardi's avatar Pietro Fezzardi

general: changed prototype of pp_open_globals

now it reflects the definition in pp_ext_hooks. With this new prototype
you can always choose a different pp_runtime_opts to be used for the
initialization
parent 99c0d78e
......@@ -101,7 +101,7 @@ int main(int argc, char **argv)
exit(__LINE__);
}
pp_open_globals(ppg);
pp_open_globals(ppg, &__pp_default_rt_opts);
unix_main_loop(ppg);
return 0; /* never reached */
......
......@@ -181,7 +181,7 @@ int wrc_ptp_start()
{
struct pp_instance *ppi = &ppi_static;
pp_open_globals(&ppg_static);
pp_open_globals(&ppg_static, &__pp_default_rt_opts);
/* Call the state machine. Being it in "Initializing" state, make
* ppsi initialize what is necessary */
......
......@@ -165,7 +165,7 @@ int main(int argc, char **argv)
}
pp_open_globals(ppg);
pp_open_globals(ppg, &__pp_default_rt_opts);
wrs_main_loop(ppg);
return 0; /* never reached */
......
......@@ -251,7 +251,7 @@ static inline void pp_timeout_restart_annrec(struct pp_instance *ppi)
/* The channel for an instance must be created and possibly destroyed. */
extern int pp_open_globals(struct pp_globals *ppg);
extern int pp_open_globals(struct pp_globals *ppg, struct pp_runtime_opts *opts);
extern int pp_close_globals(struct pp_globals *ppg);
extern int pp_parse_cmdline(struct pp_globals *ppg, int argc, char **argv);
......
......@@ -71,7 +71,7 @@ int ppsi_main(int argc, char **argv)
return -1;
/* This just allocates the stuff */
pp_open_globals(ppg);
pp_open_globals(ppg, &__pp_default_rt_opts);
/* The actual sockets are opened in state-initializing */
bare_main_loop(ppi);
......
......@@ -40,7 +40,7 @@ struct pp_runtime_opts __pp_default_rt_opts = {
* state machine to the first state.
*/
int pp_open_globals(struct pp_globals *ppg)
int pp_open_globals(struct pp_globals *ppg, struct pp_runtime_opts *pp_rt_opts)
{
/*
* Initialize default data set
......@@ -55,7 +55,7 @@ int pp_open_globals(struct pp_globals *ppg)
struct pp_runtime_opts *rt_opts;
if (!ppg->rt_opts)
ppg->rt_opts = &__pp_default_rt_opts;
ppg->rt_opts = pp_rt_opts;
rt_opts = ppg->rt_opts;
......
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