Fix order of priority reading / file reading (bug #3860)
authorMark Spencer <markster@digium.com>
Sat, 26 Mar 2005 07:16:18 +0000 (07:16 +0000)
committerMark Spencer <markster@digium.com>
Sat, 26 Mar 2005 07:16:18 +0000 (07:16 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5266 65c4cc65-6c06-0410-ace0-fbb531ad65f3

asterisk.c

index cb31376..8c62dca 100755 (executable)
@@ -1787,6 +1787,14 @@ int main(int argc, char *argv[])
                }
        }
 
+       if (option_console && !option_verbose) 
+               ast_verbose("[ Reading Master Configuration ]");
+       ast_readconfig();
+
+       if (set_priority(option_highpriority)) {
+               exit(1);
+       }
+
        if (rungroup) {
                struct group *gr;
                gr = getgrnam(rungroup);
@@ -1802,9 +1810,6 @@ int main(int argc, char *argv[])
                        ast_verbose("Running as group '%s'\n", rungroup);
        }
 
-       if (set_priority(option_highpriority)) {
-               exit(1);
-       }
        if (runuser) {
                struct passwd *pw;
                pw = getpwnam(runuser);
@@ -1825,10 +1830,6 @@ int main(int argc, char *argv[])
        fflush(stdout);
 
        if (option_console && !option_verbose) 
-               ast_verbose("[ Reading Master Configuration ]");
-       ast_readconfig();
-
-       if (option_console && !option_verbose) 
                ast_verbose("[ Initializing Custom Configuration Options ]");
        /* custom config setup */
        register_config_cli();