From 8bf91ce80ffeaa6de2273040f17f6fd869641898 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 21 Dec 2009 23:37:17 +0100 Subject: main: add convenience wrapper reload_config() for reload_config_file() Michael --- src/main.c | 13 +++++++++++++ src/main.h | 2 ++ 2 files changed, 15 insertions(+) (limited to 'src') diff --git a/src/main.c b/src/main.c index 0e9c180..fb7ac37 100644 --- a/src/main.c +++ b/src/main.c @@ -324,6 +324,19 @@ static void initialize_config_defaults (struct config_s *conf) conf->idletimeout = MAX_IDLE_TIME; } +/** + * convenience wrapper around reload_config_file + */ +int reload_config (void) +{ + int ret; + + ret = reload_config_file (config_defaults.config_file, &config, + &config_defaults); + + return ret; +} + int main (int argc, char **argv) { diff --git a/src/main.h b/src/main.h index f3864e4..91fe61a 100644 --- a/src/main.h +++ b/src/main.h @@ -33,4 +33,6 @@ extern struct config_s config; extern unsigned int received_sighup; /* boolean */ extern unsigned int processed_config_file; /* boolean */ +extern int reload_config (void); + #endif /* __MAIN_H__ */ -- cgit v1.2.3