]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - gui.c
gui: Improve config reload.
[paraslash.git] / gui.c
diff --git a/gui.c b/gui.c
index e53d5c73e41e7f665e4d14bb65d4113216a295ba..a20750f7f300800b7255b32a50120a0526b1ff58 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -893,6 +893,19 @@ out:
                exit(EXIT_FAILURE);
 }
 
+/* reread configuration, terminate on errors */
+static void reread_conf(void)
+{
+       /*
+        * gengetopt might print to stderr and exit on errors. So we have to
+        * shutdown curses first.
+        */
+       shutdown_curses();
+       parse_config_file_or_die(true /* override */);
+       init_curses();
+       print_in_bar(COLOR_MSG, "config file reloaded\n");
+}
+
 /*
  * React to various signal-related events
  */
@@ -917,7 +930,7 @@ static void handle_signal(int sig)
                return;
        case SIGUSR1:
                PARA_NOTICE_LOG("got SIGUSR1, rereading configuration\n");
-               com_reread_conf();
+               reread_conf();
                return;
        case SIGCHLD:
                check_sigchld();
@@ -1296,19 +1309,9 @@ static void com_ll_incr(void)
        print_in_bar(COLOR_MSG, "loglevel set to %d\n", loglevel);
 }
 
-/*
- * reread configuration, terminate on errors
- */
 static void com_reread_conf(void)
 {
-       /*
-        * gengetopt might print to stderr and exit on errors. So we have to
-        * shutdown curses first.
-        */
-       shutdown_curses();
-       parse_config_file_or_die(true /* override */);
-       init_curses();
-       print_in_bar(COLOR_MSG, "config file reloaded\n");
+       reread_conf();
 }
 
 static void com_help(void)