]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - afs.c
Merge topic branch t/fd into master
[paraslash.git] / afs.c
diff --git a/afs.c b/afs.c
index 8bd52c9af282c59c31106bf667625bd586ca1c53..865effde671a4848298ab09d502898c6225a937c 100644 (file)
--- a/afs.c
+++ b/afs.c
@@ -448,7 +448,7 @@ static int activate_mood_or_playlist(const char *arg, struct para_buffer *pb)
                mode = PLAY_MODE_MOOD;
        } else {
                ret = -ERRNO_TO_PARA_ERROR(EINVAL);
-               msg = make_message("%s: parse error", arg);
+               msg = make_message("%s: parse error\n", arg);
        }
        if (pb)
                para_printf(pb, "%s", msg);
@@ -529,8 +529,8 @@ static void init_admissible_files(const char *arg)
 {
        int ret = activate_mood_or_playlist(arg, NULL);
        if (ret < 0) {
-               PARA_WARNING_LOG("could not activate %s: %s\n", arg,
-                       para_strerror(-ret));
+               PARA_WARNING_LOG("could not activate %s: %s\n", arg?
+                       arg : "dummy", para_strerror(-ret));
                if (arg)
                        activate_mood_or_playlist(NULL, NULL);
        }
@@ -952,6 +952,7 @@ __noreturn void afs_init(int socket_fd)
        ret = schedule(&s);
        sched_shutdown(&s);
        mood_unload();
+       playlist_unload();
 out_close:
        close_afs_tables();
 out: