diff options
Diffstat (limited to 'src/conf.c')
-rw-r--r-- | src/conf.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -54,6 +54,7 @@ HAPI struct conf g_conf = { .replace_tag = "/APPID/", .slave_ttl = 30.0f, + .slave_activate_time = 30.0f, .max_log_line = 1000, .max_log_file = 3, @@ -215,7 +216,14 @@ static void slave_ttl_handler(char *buffer) { if (sscanf(buffer, "%lf", &g_conf.slave_ttl) != 1) ErrPrint("Failed to parse the slave_ttl\n"); - DbgPrint("Slave TTL: %s\n", g_conf.slave_ttl); + DbgPrint("Slave TTL: %lf\n", g_conf.slave_ttl); +} + +static void slave_activate_time_handler(char *buffer) +{ + if (sscanf(buffer, "%lf", &g_conf.slave_activate_time) != 1) + ErrPrint("Failed to parse the slave_activate_time\n"); + DbgPrint("Slave activate time: %lf\n", g_conf.slave_activate_time); } static void max_log_line_handler(char *buffer) @@ -377,6 +385,10 @@ HAPI int conf_loader(void) .handler = slave_ttl_handler, }, { + .name = "slave_activate_time", + .handler = slave_activate_time_handler, + }, + { .name = "max_log_line", .handler = max_log_line_handler, }, |