ret = change_current_mood(arg + 2);
mode = PLAY_MODE_MOOD;
} else
- return -E_AFS_SYNTAX;
+ return -ERRNO_TO_PARA_ERROR(EINVAL);
if (ret < 0)
return ret;
}
strncpy(mmd->afs_mode_string, arg,
sizeof(mmd->afs_mode_string));
mmd->afs_mode_string[sizeof(mmd->afs_mode_string) - 1] = '\0';
+ mmd->events++;
mutex_unlock(mmd_mutex);
} else {
mutex_lock(mmd_mutex);
strcpy(mmd->afs_mode_string, "dummy");
+ mmd->events++;
mutex_unlock(mmd_mutex);
current_mop = NULL;
}
goto out;
/* ignore subsequent errors (but log them) */
para_printf(&aca->pbout, "could not activate %s\n", arg);
- if (current_mop) {
+ if (current_mop && strcmp(current_mop, arg) != 0) {
int ret2;
para_printf(&aca->pbout, "switching back to %s\n", current_mop);
ret2 = activate_mood_or_playlist(current_mop, &num_admissible);