X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=audiod_command.c;h=cb4363b15bc12507af12c07ed0d0f3978da2ac55;hp=a26d1931478a053f0c59991206338b84cd42b7bf;hb=089fb2fb2d9e2a3473aa6fac91681ca8ddfffff3;hpb=870fcd0379ab096184f42481541d668694da7c83 diff --git a/audiod_command.c b/audiod_command.c index a26d1931..cb4363b1 100644 --- a/audiod_command.c +++ b/audiod_command.c @@ -1,8 +1,4 @@ -/* - * Copyright (C) 2005 Andre Noll - * - * Licensed under the GPL v2. For licencing details see COPYING. - */ +/* Copyright (C) 2005 Andre Noll , see file COPYING. */ /** \file audiod_command.c Commands for para_audiod. */ @@ -15,9 +11,9 @@ #include #include +#include "audiod.lsg.h" #include "para.h" #include "audiod_cmd.lsg.h" -#include "audiod.cmdline.h" #include "list.h" #include "sched.h" #include "buffer_tree.h" @@ -82,7 +78,7 @@ static INITIALIZED_LIST_HEAD(client_list); static int num_clients; /** The list of all status items used by para_{server,audiod,gui}. */ -const char *status_item_list[] = {STATUS_ITEM_ARRAY}; +const char *status_item_list[] = {STATUS_ITEMS}; static void dump_stat_client_list(void) { @@ -416,7 +412,7 @@ EXPORT_AUDIOD_CMD_HANDLER(version) * \return Positive on success, negative on errors, zero if there was no * connection to accept. * - * \sa para_accept(), recv_cred_buffer() + * \sa \ref para_accept(), \ref recv_cred_buffer(). * */ int handle_connect(int accept_fd, fd_set *rfds) { @@ -426,7 +422,7 @@ int handle_connect(int accept_fd, fd_set *rfds) uid_t uid; const struct lls_command *cmd; struct lls_parse_result *lpr; - char *errctx; + char *errctx = NULL; const struct audiod_command_info *aci; ret = para_accept(accept_fd, rfds, &unix_addr, sizeof(struct sockaddr_un), &clifd); @@ -481,41 +477,41 @@ void audiod_status_dump(bool force) { char *old, *new; - old = stat_item_values[SI_PLAY_TIME]; + old = stat_item_values[SI_play_time]; new = get_time_string(); if (new) { if (force || !old || strcmp(old, new)) { free(old); - stat_item_values[SI_PLAY_TIME] = new; - stat_client_write_item(SI_PLAY_TIME); + stat_item_values[SI_play_time] = new; + stat_client_write_item(SI_play_time); } else free(new); } new = daemon_get_uptime_str(now); - old = stat_item_values[SI_AUDIOD_UPTIME]; + old = stat_item_values[SI_audiod_uptime]; if (force || !old || strcmp(old, new)) { free(old); - stat_item_values[SI_AUDIOD_UPTIME] = new; - stat_client_write_item(SI_AUDIOD_UPTIME); + stat_item_values[SI_audiod_uptime] = new; + stat_client_write_item(SI_audiod_uptime); } else free(new); - old = stat_item_values[SI_AUDIOD_STATUS]; + old = stat_item_values[SI_audiod_status]; new = audiod_status_string(); if (force || !old || strcmp(old, new)) { free(old); - stat_item_values[SI_AUDIOD_STATUS] = new; - stat_client_write_item(SI_AUDIOD_STATUS); + stat_item_values[SI_audiod_status] = new; + stat_client_write_item(SI_audiod_status); } else free(new); - old = stat_item_values[SI_DECODER_FLAGS]; + old = stat_item_values[SI_decoder_flags]; new = audiod_get_decoder_flags(); if (force || !old || strcmp(old, new)) { free(old); - stat_item_values[SI_DECODER_FLAGS] = new; - stat_client_write_item(SI_DECODER_FLAGS); + stat_item_values[SI_decoder_flags] = new; + stat_client_write_item(SI_decoder_flags); } else free(new); }