diff options
-rw-r--r-- | src/daemon/settings.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/daemon/settings.c b/src/daemon/settings.c index 355fe1d..855d4bb 100644 --- a/src/daemon/settings.c +++ b/src/daemon/settings.c @@ -126,14 +126,13 @@ static int setting_readconf(const char * const path) return 0; } -/* TODO: stub! */ static int setting_handle_config_entry(const char * const entry, const char * const value) { size_t i; for (i = 0; i < sizeof(ent_table)/sizeof(*ent_table); ++i) { if (!(strcmp(entry, ent_table[i].name))) { - ent_table[0].set(value); + ent_table[i].set(value); return 0; } } @@ -148,14 +147,16 @@ static void set_daemonize(const void * const arg) atoi(a) ? set_flag(flag_daemonize) : unset_flag(flag_daemonize); } -/* TODO: stub! */ static void set_port(const void * const arg) { - (void) arg; + const char * const a = arg; + + settings.port = strtoul(a, NULL, 0); } -/* TODO: stub! */ static void set_verbosity(const void * const arg) { - (void) arg; + const char * const a = arg; + + settings.verboselevel = strtol(a, NULL, 0); } |