add: mqtt host config option
This commit is contained in:
parent
b2ac46c0fd
commit
eefe50b3cd
5 changed files with 12 additions and 8 deletions
src/helpers
|
@ -26,7 +26,6 @@ helper_load_config(IniDispatch *disp, void *config_void)
|
|||
}
|
||||
if(CONFINI_IS_KEY("controller", "database"))
|
||||
{
|
||||
config->database = malloc(sizeof(char) * (strlen(disp->value) + 1));
|
||||
strcpy(config->database, disp->value);
|
||||
return 0;
|
||||
}
|
||||
|
@ -75,6 +74,11 @@ helper_load_config(IniDispatch *disp, void *config_void)
|
|||
config->mqtt_port = atoi(disp->value);
|
||||
return 0;
|
||||
}
|
||||
if(CONFINI_IS_KEY("controller", "mqtt-host"))
|
||||
{
|
||||
strcpy(config->mqtt_host, disp->value);
|
||||
return 0;
|
||||
}
|
||||
if(CONFINI_IS_KEY("controller", "relay-count"))
|
||||
{
|
||||
config->relay_count = atoi(disp->value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue