int ret;
char *msg;
- if (!arg) {
- ret = mood_load(NULL, &msg);
+ if (!arg) { /* load dummy mood */
+ ret = mood_load(NULL, NULL, &msg);
mode = PLAY_MODE_MOOD;
} else if (!strncmp(arg, "p/", 2)) {
- ret = playlist_load(arg + 2, &msg);
+ ret = playlist_load(arg + 2, NULL, &msg);
mode = PLAY_MODE_PLAYLIST;
} else if (!strncmp(arg, "m/", 2)) {
- ret = mood_load(arg + 2, &msg);
+ ret = mood_load(arg + 2, NULL, &msg);
mode = PLAY_MODE_MOOD;
} else {
ret = -ERRNO_TO_PARA_ERROR(EINVAL);
{
int ret = activate_mood_or_playlist(arg, NULL);
if (ret < 0) {
- PARA_WARNING_LOG("could not activate %s: %s\n", arg,
- para_strerror(-ret));
+ PARA_WARNING_LOG("could not activate %s: %s\n", arg?
+ arg : "dummy", para_strerror(-ret));
if (arg)
activate_mood_or_playlist(NULL, NULL);
}
}
ret = schedule(&s);
sched_shutdown(&s);
- mood_unload();
+ mood_unload(NULL);
out_close:
close_afs_tables();
out:
arg = lls_input(0, aca->lpr);
score_clear();
if (current_play_mode == PLAY_MODE_MOOD)
- mood_unload();
+ mood_unload(NULL);
else
- playlist_unload();
+ playlist_unload(NULL);
ret = activate_mood_or_playlist(arg, &aca->pbout);
if (ret >= 0)
goto free_lpr;
send_errctx(cc, errctx);
return ret;
}
- return send_lls_callback_request(com_select_callback, cmd, lpr, cc);
+ ret = send_lls_callback_request(com_select_callback, cmd, lpr, cc);
+ return ret == osl(-E_OSL_RB_KEY_NOT_FOUND)? -E_BAD_MOP : ret;
}
EXPORT_SERVER_CMD_HANDLER(select);