/*
- * Copyright (C) 2007 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2007-2008 Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
PARA_NOTICE_LOG("getting next audio file\n");
ret = score_get_best(&aft_row, &score);
if (ret < 0) {
- PARA_ERROR_LOG("%s\n", PARA_STRERROR(-ret));
+ PARA_ERROR_LOG("%s\n", para_strerror(-ret));
goto no_admissible_files;
}
ret = open_and_update_audio_file(aft_row, score, &afd);
if (ret < 0) {
- PARA_ERROR_LOG("%s\n", PARA_STRERROR(-ret));
+ PARA_ERROR_LOG("%s\n", para_strerror(-ret));
ret = score_delete(aft_row);
if (ret < 0) {
- PARA_ERROR_LOG("%s\n", PARA_STRERROR(-ret));
+ PARA_ERROR_LOG("%s\n", para_strerror(-ret));
goto no_admissible_files;
}
goto again;
ret = change_current_mood(NULL); /* always successful */
mode = PLAY_MODE_MOOD;
} else {
- if (!strncmp(arg, "p:", 2)) {
+ if (!strncmp(arg, "p/", 2)) {
ret = playlist_open(arg + 2);
mode = PLAY_MODE_PLAYLIST;
- } else if (!strncmp(arg, "m:", 2)) {
+ } else if (!strncmp(arg, "m/", 2)) {
ret = change_current_mood(arg + 2);
mode = PLAY_MODE_MOOD;
} else
playlist_close();
ret = activate_mood_or_playlist(arg, &num_admissible);
if (ret < 0) {
- para_printf(&pb, "%s\n", PARA_STRERROR(-ret));
+ para_printf(&pb, "%s\n", para_strerror(-ret));
para_printf(&pb, "switching back to %s\n", current_mop?
current_mop : "dummy");
ret = activate_mood_or_playlist(current_mop, &num_admissible);
ret = create_local_socket(socket_name, &unix_addr,
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IWOTH);
if (ret < 0) {
- PARA_EMERG_LOG("%s: %s\n", PARA_STRERROR(-ret), socket_name);
+ PARA_EMERG_LOG("%s: %s\n", para_strerror(-ret), socket_name);
exit(EXIT_FAILURE);
}
socket_fd = ret;
if (ret >= 0)
continue;
PARA_ERROR_LOG("%s init: %s\n", afs_tables[i].name,
- PARA_STRERROR(-ret));
+ para_strerror(-ret));
break;
}
if (ret >= 0)
}
t->ret = -E_AFS_SIGNAL;
err:
- PARA_NOTICE_LOG("%s\n", PARA_STRERROR(-t->ret));
+ PARA_NOTICE_LOG("%s\n", para_strerror(-t->ret));
unregister_tasks();
}
if (ret <= 0) {
if (ret < 0)
- PARA_ERROR_LOG("%s\n", PARA_STRERROR(-ret));
+ PARA_ERROR_LOG("%s\n", para_strerror(-ret));
return;
}
buf[ret] = '\0';
if (!strcmp(buf, "new")) {
ret = open_next_audio_file();
if (ret < 0) {
- PARA_EMERG_LOG("%s\n", PARA_STRERROR(-ret));
+ PARA_EMERG_LOG("%s\n", para_strerror(-ret));
unregister_tasks();
}
return;
int ret = recv_bin_buffer(fd, buf, sizeof(buf));
if (ret < 0) {
- PARA_NOTICE_LOG("%s\n", PARA_STRERROR(-ret));
+ PARA_NOTICE_LOG("%s\n", para_strerror(-ret));
return;
}
if (ret != sizeof(buf)) {
goto out;
t->ret = para_accept(ct->fd, &unix_addr, sizeof(unix_addr));
if (t->ret < 0) {
- PARA_NOTICE_LOG("%s\n", PARA_STRERROR(-t->ret));
+ PARA_NOTICE_LOG("%s\n", para_strerror(-t->ret));
goto out;
}
fd = t->ret;
t->ret = mark_fd_nonblocking(fd);
if (t->ret < 0) {
- PARA_NOTICE_LOG("%s\n", PARA_STRERROR(-t->ret));
+ PARA_NOTICE_LOG("%s\n", para_strerror(-t->ret));
close(fd);
goto out;
}
ret = open_afs_tables();
if (ret < 0) {
- PARA_EMERG_LOG("%s\n", PARA_STRERROR(-ret));
+ PARA_EMERG_LOG("%s\n", para_strerror(-ret));
exit(EXIT_FAILURE);
}
server_socket = socket_fd;
s.default_timeout.tv_usec = 999 * 1000;
ret = schedule(&s);
if (ret < 0)
- PARA_EMERG_LOG("%s\n", PARA_STRERROR(-ret));
+ PARA_EMERG_LOG("%s\n", para_strerror(-ret));
close_afs_tables();
exit(EXIT_FAILURE);
}
continue;
ret = t->event_handler(event, pb, data);
if (ret < 0)
- PARA_CRIT_LOG("%s\n", PARA_STRERROR(-ret));
+ PARA_CRIT_LOG("%s\n", para_strerror(-ret));
}
}