X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=mixer.c;fp=mixer.c;h=eae8929164770053c5c18843f4cf4e4e8bc5e616;hp=55282e77b6b3093e88f9bc66514d684956653e31;hb=e2e1adca824585eeecd091f54955e51212927533;hpb=ac289a22fd438a97d5eda86793a47377d0d570ce diff --git a/mixer.c b/mixer.c index 55282e77..eae89291 100644 --- 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");