mirror of
https://github.com/tio/tio.git
synced 2026-05-01 23:07:58 +02:00
Make sure only matched config section is parsed
This commit is contained in:
parent
9b55f18c07
commit
94485ec9ac
1 changed files with 3 additions and 3 deletions
|
|
@ -87,8 +87,8 @@ static int data_handler(void *user, const char *section, const char *name,
|
||||||
{
|
{
|
||||||
UNUSED(user);
|
UNUSED(user);
|
||||||
|
|
||||||
// If section matches user input or unnamed section
|
// If section matches current section being parsed
|
||||||
if ((!strcmp(section, c->section_name)) || (!strcmp(section, "")))
|
if (!strcmp(section, c->section_name))
|
||||||
{
|
{
|
||||||
// Set configuration parameter if found
|
// Set configuration parameter if found
|
||||||
if (!strcmp(name, "tty"))
|
if (!strcmp(name, "tty"))
|
||||||
|
|
@ -337,7 +337,7 @@ void config_file_parse(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse settings of found section
|
// Parse settings of found section (sub config)
|
||||||
ret = ini_parse(c->path, data_handler, NULL);
|
ret = ini_parse(c->path, data_handler, NULL);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue