this will be used after the server starts, because that's when
the callback is hit. It won't (yet) be used in references
as the configuration files are being read.
* discover it automatically.
*/
if (value == 0) {
+ char *strvalue;
+
value = fr_hw_num_cores_active();
/*
value -= conf->max_networks;
}
+ strvalue = talloc_asprintf(ci, "%u", value);
+ (void) cf_pair_replace(cf_item_to_section(cf_parent(ci)), cf_item_to_pair(ci), strvalue);
+ talloc_free(strvalue);
+
/*
* Otherwise just create as many
* workers as we have cores.