Add configuration include file support.
This commit is contained in:
parent
6f7b5761c6
commit
58b2c604d8
13
options.c
13
options.c
@ -90,12 +90,6 @@ readoptionsfile(const char * fname)
|
||||
if(!(hfile = fopen(fname, "r")))
|
||||
return -1;
|
||||
|
||||
if(ary_options != NULL)
|
||||
{
|
||||
free(ary_options);
|
||||
num_options = 0;
|
||||
}
|
||||
|
||||
while(fgets(buffer, sizeof(buffer), hfile))
|
||||
{
|
||||
linenum++;
|
||||
@ -152,8 +146,11 @@ readoptionsfile(const char * fname)
|
||||
|
||||
if(id == UPNP_INVALID)
|
||||
{
|
||||
fprintf(stderr, "parsing error file %s line %d : %s=%s\n",
|
||||
fname, linenum, name, value);
|
||||
if (strcmp(name, "include") == 0)
|
||||
readoptionsfile(value);
|
||||
else
|
||||
fprintf(stderr, "parsing error file %s line %d : %s=%s\n",
|
||||
fname, linenum, name, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user