return false;
}
- if (cf_data_add(cs, clients, NULL, true) < 0) {
+ if (!cf_data_add(cs, clients, NULL, true)) {
ERROR("Failed to associate clients with virtual server %s", client->server);
talloc_free(clients);
return false;
/*
* Associate the clients structure with the section.
*/
- if (cf_data_add(section, clients, NULL, false) < 0) {
+ if (!cf_data_add(section, clients, NULL, false)) {
cf_log_err(section, "Failed to associate clients with section %s", cf_section_name1(section));
talloc_free(clients);
return NULL;
return NULL;
}
- cs = cf_section_find(cs, "client", NULL);
+ cs = cf_section_find(cs, "client", CF_IDENT_ANY);
if (!cs) {
ERROR("No \"client\" section found in client file");
return NULL;
}
}
-
-
/** Parses a #CONF_PAIR into a C data type
*
* @copybrief cf_pair_value
/** Return the next child that's of the specified type with the specified identifiers
*
* @param[in] parent The section we're searching in.
+ * @param[in] prev item we found, or NULL to start from the beginning.
* @param[in] type of #CONF_ITEM we're searching for.
* @param[in] ident1 The first identifier.
* @param[in] ident2 The second identifier. Special value CF_IDENT_ANY
scope = fr_str2int(fr_ldap_scope, inst->sync_config[i]->scope_str, -1);
if (scope < 0) {
- cf_log_err(cs, "Invalid 'user.scope' value \"%s\", expected 'sub', 'one'"
#ifdef LDAP_SCOPE_CHILDREN
- ", 'base' or 'children'"
+ cf_log_err(cs, "Invalid 'user.scope' value \"%s\", expected 'sub', 'one'"
+ ", 'base' or 'children'", inst->sync_config[i]->scope_str);
#else
- " or 'base'"
+ cf_log_err(cs, "Invalid 'user.scope' value \"%s\", expected 'sub', 'one'"
+ " or 'base'", inst->sync_config[i]->scope_str)
#endif
- , inst->sync_config[i]->scope_str);
+ );
return -1;
}
inst->sync_config[i]->scope = scope;