configfile: multiple tuple per line

This commit is contained in:
Olaf Rempel 2006-08-26 14:07:45 +02:00
parent cc227cc7cc
commit a1c55be85e
1 changed files with 6 additions and 3 deletions

View File

@ -123,10 +123,13 @@ int config_parse(char *config)
break; break;
} }
if ((tok = strtok(row, " \n")) && (tok2 = strtok(NULL, " \n"))) if ((tok = strtok(row, " \n"))) {
while ((tok2 = strtok(NULL, " \n"))) {
if (!config_add_tupel(section, tok, tok2)) if (!config_add_tupel(section, tok, tok2))
log_print(LOG_WARN, "config_parse(): invalid row %d", i); log_print(LOG_WARN, "config_parse(): invalid row %d", i);
} }
}
}
fclose(fz); fclose(fz);
free(row); free(row);