return -E_NO_MORE_SLOTS;
}
-static void close_stat_pipe(void)
-{
- int i;
-
- if (!stat_task->pcd)
- return;
- client_close(stat_task->pcd);
- stat_task->pcd = NULL;
- for (i = 0; i < NUM_STAT_ITEMS; i++) {
- free(stat_task->stat_item_values[i]);
- stat_task->stat_item_values[i] = NULL;
- }
- dump_empty_status();
- stat_task->length_seconds = 0;
- stat_task->offset_seconds = 0;
- audiod_status_dump();
- stat_task->playing = 0;
- stat_task->stat_item_values[SI_STATUS_BAR] = make_message(
- "%s:no connection to para_server\n",
- status_item_list[SI_STATUS_BAR]);
- stat_client_write(stat_task->stat_item_values[SI_STATUS_BAR],
- SI_STATUS_BAR);
- if (stat_task->clock_diff_count) {
- stat_task->clock_diff_barrier.tv_sec = now->tv_sec + 1;
- stat_task->clock_diff_barrier.tv_usec = now->tv_usec;
- }
-}
-
-void __noreturn clean_exit(int status, const char *msg)
-{
- PARA_EMERG_LOG("%s\n", msg);
- if (socket_name)
- unlink(socket_name);
- close_stat_pipe();
- exit(status);
-}
-
/**
* get the number of filters
*
sprintf(ct->task.status, "command task");
}
+static void close_stat_pipe(void)
+{
+ int i;
+
+ if (!stat_task->pcd)
+ return;
+ client_close(stat_task->pcd);
+ stat_task->pcd = NULL;
+ for (i = 0; i < NUM_STAT_ITEMS; i++) {
+ free(stat_task->stat_item_values[i]);
+ stat_task->stat_item_values[i] = NULL;
+ }
+ dump_empty_status();
+ stat_task->length_seconds = 0;
+ stat_task->offset_seconds = 0;
+ audiod_status_dump();
+ stat_task->playing = 0;
+ stat_task->stat_item_values[SI_STATUS_BAR] = make_message(
+ "%s:no connection to para_server\n",
+ status_item_list[SI_STATUS_BAR]);
+ stat_client_write(stat_task->stat_item_values[SI_STATUS_BAR],
+ SI_STATUS_BAR);
+ if (stat_task->clock_diff_count) {
+ stat_task->clock_diff_barrier.tv_sec = now->tv_sec + 1;
+ stat_task->clock_diff_barrier.tv_usec = now->tv_usec;
+ }
+}
+
+void __noreturn clean_exit(int status, const char *msg)
+{
+ PARA_EMERG_LOG("%s\n", msg);
+ if (socket_name)
+ unlink(socket_name);
+ close_stat_pipe();
+ exit(status);
+}
+
+
static void client_task_event_handler(__a_unused struct task *t)
{
struct private_client_data *pcd = t->private_data;