Fixed wrong error messages if configs where load from file.
authorDaniel Carl <danielcarl@gmx.de>
Sun, 27 Jan 2013 17:24:17 +0000 (18:24 +0100)
committerDaniel Carl <danielcarl@gmx.de>
Sun, 27 Jan 2013 17:24:17 +0000 (18:24 +0100)
src/main.c

index ce103d9..bd152eb 100644 (file)
@@ -571,7 +571,9 @@ static void vp_read_config(void)
 {
     /* load default config */
     for (guint i = 0; default_config[i].command != NULL; i++) {
-        vp_process_input(default_config[i].command);
+        if (!vp_process_input(default_config[i].command)) {
+            fprintf(stderr, "Invalid default config: %s\n", default_config[i].command);
+        }
     }
 
     /* read config from config files */
@@ -587,7 +589,7 @@ static void vp_read_config(void)
             if (!g_ascii_isalpha(line[0])) {
                 continue;
             }
-            if (vp_process_input(line)) {
+            if (!vp_process_input(line)) {
                 fprintf(stderr, "Invalid config: %s\n", line);
             }
         }