summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-11-27 12:49:46 +0100
committerGravatar waker <wakeroid@gmail.com>2011-11-27 12:49:46 +0100
commit204f39c855a62d6b9239716eec4a37fb81fcd624 (patch)
tree9d707f162ffe66b24dafd64beb000d49ea4a97e8 /main.c
parent67e3d2ed92c14feeb53ed222dd297681f9824545 (diff)
fixed clearing playqueue on exit
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.c b/main.c
index 91b7b145..ee1007a2 100644
--- a/main.c
+++ b/main.c
@@ -426,6 +426,7 @@ player_mainloop (void) {
conf_save ();
break;
case DB_EV_TERMINATE:
+ pl_playqueue_clear ();
term = 1;
break;
case DB_EV_PLAY_CURRENT:
@@ -883,6 +884,7 @@ main (int argc, char *argv[]) {
server_tid = thread_start (server_loop, NULL);
// this runs in main thread (blocks right here)
player_mainloop ();
+
// terminate server and wait for completion
if (server_tid) {
server_terminate = 1;
@@ -924,9 +926,7 @@ main (int argc, char *argv[]) {
conf_free ();
messagepump_free ();
plug_cleanup ();
-#if 0
- sigterm_handled = 1;
-#endif
+
fprintf (stderr, "hej-hej!\n");
return 0;
}