* @str: The string to process.
* @name_out: Returns a pointer to the name.
* @value_out: Returns a pointer to the value.
* @str: The string to process.
* @name_out: Returns a pointer to the name.
* @value_out: Returns a pointer to the value.
*
* Parses a name=value pair returning pointers in @name_out and @value_out.
* The pair can be terminated by @terminator or a zero.
*
* Parses a name=value pair returning pointers in @name_out and @value_out.
* The pair can be terminated by @terminator or a zero.
-char *conf_get_param_pair(char *str, char **name_out, char **value_out,
- char terminator)
+char *conf_get_pair(struct conf_context __attribute__((unused)) *conf, char *str,
+ char **name_out, char **value_out, char delimiter, char terminator)
/* terminate the value */
end = strchr(str, terminator);
if (end)
*end = 0;
/* terminate the value */
end = strchr(str, terminator);
if (end)
*end = 0;
- sep = strchr(str, '=');
+ conf_replace_char(str, '\t', ' ');
+
+ str = conf_strip_str(str);
+
+ if (!str)
+ goto exit;
+
+ sep = strchr(str, delimiter);
pb_log("%s: @%s@%s@\n", __func__, *name_out, *value_out);
return end ? end + 1 : NULL;
pb_log("%s: @%s@%s@\n", __func__, *name_out, *value_out);
return end ? end + 1 : NULL;
for (i = 0; conf->global_options[i].name; i++) {
if (streq(name, conf->global_options[i].name)) {
conf->global_options[i].value
for (i = 0; conf->global_options[i].name; i++) {
if (streq(name, conf->global_options[i].name)) {
conf->global_options[i].value
for (i = 0; conf->global_options[i].name ;i++)
if (streq(name, conf->global_options[i].name)) {
pb_log("%s: @%s@%s@\n", __func__, name,
for (i = 0; conf->global_options[i].name ;i++)
if (streq(name, conf->global_options[i].name)) {
pb_log("%s: @%s@%s@\n", __func__, name,
- pos = conf_get_param_pair(pos, &name, &value, '\n');
+ pos = conf->get_pair(conf, pos, &name, &value, '\n');