From: Andre Noll Date: Thu, 5 Apr 2012 23:18:23 +0000 (+0200) Subject: Define status item list in afh_common.c. X-Git-Tag: v0.4.11~28 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=54a1c08546d2f37186fb0bdd3b9b86bfcf0e90cd;p=paraslash.git Define status item list in afh_common.c. The status_item_list array is needed for the audio format handler info struct (afhi), so all executables which contain afh_common.o need it. Currently, afh.c and command.c define their own instance for para_afh and para_server respectively. Moving the definition of the array to afc.c saves one instance. No big deal. --- diff --git a/afh.c b/afh.c index bffe6321..bc868106 100644 --- a/afh.c +++ b/afh.c @@ -18,9 +18,6 @@ #include "version.h" static struct afh_args_info conf; -/** The list of all status items */ -const char *status_item_list[] = {STATUS_ITEM_ARRAY}; - INIT_AFH_ERRLISTS; static int loglevel; diff --git a/afh_common.c b/afh_common.c index 0d54eea1..9f1d1881 100644 --- a/afh_common.c +++ b/afh_common.c @@ -33,6 +33,10 @@ void mp3_init(struct audio_format_handler *); #endif void wma_afh_init(struct audio_format_handler *); + +/** The list of all status items */ +const char *status_item_list[] = {STATUS_ITEM_ARRAY}; + /** * The list of supported audio formats. * diff --git a/command.c b/command.c index 4a464ebf..f520e3ea 100644 --- a/command.c +++ b/command.c @@ -43,8 +43,6 @@ extern struct misc_meta_data *mmd; extern struct sender senders[]; int send_afs_status(struct command_context *cc, int parser_friendly); -const char *status_item_list[] = {STATUS_ITEM_ARRAY}; - static void dummy(__a_unused int s) { }