From 5b575af4efb46010eaad39ac041e6a5f60b6ee28 Mon Sep 17 00:00:00 2001 From: Cameron Ball Date: Thu, 26 Mar 2015 07:41:21 +0000 Subject: [PATCH] Add new config metrics --- config.c | 8 ++++++++ config.h | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/config.c b/config.c index a752d13..487e3e9 100644 --- a/config.c +++ b/config.c @@ -10,6 +10,14 @@ static int handler(void* user, const char* section, const char* name, const char #define MATCH(s, n) strcmp(section, s) == 0 && strcmp(name, n) == 0 if (MATCH("global", "credit_value")) { pconfig->credit_value = atoi(value); + } else if (MATCH("global", "external_timer")) { + pconfig->external_timer = atoi(value); + } else if (MATCH("global", "sync_switch")) { + pconfig->sync_switch = atoi(value); + } else if (MATCH("global", "sync_switch_delay")) { + pconfig->sync_switch_delay = atoi(value); + } else if (MATCH("global", "default_switch_state")) { + pconfig->default_switch_state = atoi(value); //}else if (MATCH("user", "name")) { // pconfig->name = strdup(value); //} else if (MATCH("user", "email")) { diff --git a/config.h b/config.h index 625ff63..b101b84 100644 --- a/config.h +++ b/config.h @@ -3,6 +3,10 @@ typedef struct { int credit_value; + int external_timer; + int sync_switch; + int sync_switch_delay; + int default_switch_state; // const char* name; // const char* email; } configuration; -- 2.11.0