Skip to content

Commit

Permalink
Add the client to the section
Browse files Browse the repository at this point in the history
So that it isn't parsed umpteen times.
This code was accidentally deleted in the conversion to talloc
  • Loading branch information
alandekok committed Mar 13, 2013
1 parent 82fe13e commit f7b0c79
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,17 @@ RADCLIENT_LIST *clients_parse_section(CONF_SECTION *section)

if (strcmp("server", cf_section_name1(section)) == 0) in_server = TRUE;

/*
* Associate the clients structure with the section.
*/
if (cf_data_add(section, "clients", clients, NULL) < 0) {
cf_log_err(cf_sectiontoitem(section),
"Failed to associate clients with section %s",
cf_section_name1(section));
clients_free(clients);
return NULL;
}

for (cs = cf_subsection_find_next(section, NULL, "client");
cs != NULL;
cs = cf_subsection_find_next(section, cs, "client")) {
Expand Down

0 comments on commit f7b0c79

Please sign in to comment.