Skip to content

Commit

Permalink
a better fix for the last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Apr 26, 2018
1 parent 2c6dc23 commit 6d9f5ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
5 changes: 0 additions & 5 deletions src/lib/io/master.c
Expand Up @@ -2154,11 +2154,6 @@ static int mod_bootstrap(void *instance, CONF_SECTION *cs)
*/
inst->magic = PR_MAIN_MAGIC;

/*
* Bootstrap the protocol agnostic IO handler.
*/
inst->server_cs = cf_item_to_section(cf_parent(cs));

/*
* Find and bootstrap the application IO handler.
*/
Expand Down
10 changes: 6 additions & 4 deletions src/modules/proto_radius/proto_radius.c
Expand Up @@ -470,10 +470,7 @@ static void mod_process_set(void const *instance, REQUEST *request)
rad_assert(request->packet->code != 0);
rad_assert(request->packet->code <= FR_CODE_MAX);

/*
* It's already set for the unit tests.
*/
if (!request->server_cs) request->server_cs = inst->io.server_cs;
request->server_cs = inst->io.server_cs;

/*
* 'track' can be NULL when there's no network listener.
Expand Down Expand Up @@ -866,6 +863,11 @@ static int mod_bootstrap(void *instance, CONF_SECTION *conf)
i++;
}

/*
* Ensure that the server CONF_SECTION is always set.
*/
inst->io.server_cs = cf_item_to_section(cf_parent(conf));

/*
* No IO module, it's an empty listener.
*/
Expand Down

0 comments on commit 6d9f5ab

Please sign in to comment.