summaryrefslogtreecommitdiff
path: root/src/conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf.c')
-rw-r--r--src/conf.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/conf.c b/src/conf.c
index e16e1d5..ca57d98 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -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,
},