diff options
author | waker <wakeroid@gmail.com> | 2011-05-21 23:13:06 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-05-21 23:13:06 +0200 |
commit | e6b0e569261bfa7534635df45dee3aa411d2e6fb (patch) | |
tree | df0d456580d7b46add8305cdadd649e69ca504b3 /main.c | |
parent | 5cb20cc33eb974948d6f431bcee2bff8fffe99d7 (diff) |
moved server_start to happen earlier, to prevent unwanted multiple instances
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -821,6 +821,11 @@ main (int argc, char *argv[]) { // } close(s); + // become a server + if (server_start () < 0) { + exit (-1); + } + // hack: report nowplaying if (!strcmp (cmdline, "--nowplaying")) { char nothing[] = "nothing"; @@ -828,7 +833,6 @@ main (int argc, char *argv[]) { return 0; } - pl_init (); conf_init (); conf_load (); // required by some plugins at startup @@ -859,10 +863,6 @@ main (int argc, char *argv[]) { } } - // become a server - if (server_start () < 0) { - exit (-1); - } #if 0 signal (SIGTERM, sigterm_handler); atexit (atexit_handler); // helps to save in simple cases |