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 92aec1e..52c83c4 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;
-       cmd = make_message("select %s\n", afs_mode);
+       cmd = make_message("select %s", afs_mode);
        client_cmd(cmd);
        free(cmd);
        client_cmd("play");