]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
fade: Fix command for switching moods.
authorAndre Noll <maan@systemlinux.org>
Mon, 23 Jul 2012 06:41:23 +0000 (08:41 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 25 Jul 2012 16:52:48 +0000 (18:52 +0200)
It contained a newline, which was not a problem before the sideband
API was introduced. However, with sideband being the default, the
newline character is interpreted as part of the name of the mood or
playlist, causing the mood switch to fail.

The fix is simple: Just remove the trailing newline character.

fade.c

diff --git a/fade.c b/fade.c
index 92aec1e76f5da25c24ca447be91e5167e61a8ed5..52c83c4b08304a0edfb1ac316a1b4f30e6e8ac57 100644 (file)
--- a/fade.c
+++ b/fade.c
@@ -204,7 +204,7 @@ static void change_afs_mode_and_play(char *afs_mode)
        client_cmd("stop");
        if (!afs_mode)
                return;
        client_cmd("stop");
        if (!afs_mode)
                return;
-       cmd = make_message("select %s\n", afs_mode);
+       cmd = make_message("select %s", afs_mode);
        client_cmd(cmd);
        free(cmd);
        client_cmd("play");
        client_cmd(cmd);
        free(cmd);
        client_cmd("play");