]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - mixer.c
crypt_common: Constify hash pointers.
[paraslash.git] / mixer.c
diff --git a/mixer.c b/mixer.c
index 55282e77b6b3093e88f9bc66514d684956653e31..eae8929164770053c5c18843f4cf4e4e8bc5e616 100644 (file)
--- a/mixer.c
+++ b/mixer.c
@@ -318,7 +318,7 @@ static int com_sleep(const struct mixer *m)
        PARA_INFO_LOG("waketime: %d:%02d\n", tm->tm_hour, tm->tm_min);
        client_cmd("stop");
        sleep(1);
-       if (fot && fo_mood) {
+       if (fot && fo_mood && *fo_mood) {
                ret = set_initial_volume(m, h);
                if (ret < 0)
                        goto close_mixer;
@@ -335,14 +335,14 @@ static int com_sleep(const struct mixer *m)
                if (ret < 0)
                        goto close_mixer;
        }
-       if (sleep_mood) {
+       if (sleep_mood && *sleep_mood) {
                change_afs_mode(sleep_mood);
                if (!fot || !fo_mood) /* currently stopped */
                        client_cmd("play");
-       } else if (fot && fo_mood) /* currently playing */
+       } else if (fot && fo_mood && *fo_mood) /* currently playing */
                client_cmd("stop");
        m->close(&h);
-       if (!fit || !fi_mood) /* nothing to do */
+       if (!fit || !fi_mood || !*fi_mood) /* nothing to do */
                return 1;
        for (;;) {
                time(&t1);
@@ -355,7 +355,7 @@ static int com_sleep(const struct mixer *m)
                sleep(delay);
        }
        change_afs_mode(fi_mood);
-       if (sleep_mood) /* currently playing */
+       if (sleep_mood && *sleep_mood) /* currently playing */
                client_cmd("next");
        else /* currently stopped */
                client_cmd("play");