From: Andre Noll Date: Sun, 4 Apr 2010 21:21:52 +0000 (+0200) Subject: Simplify com_sender(). X-Git-Tag: v0.4.2~17 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=6d1b1feadb2e7221874b7be205c51e0fe56d0519;p=paraslash.git Simplify com_sender(). The list of senders is always the same, no need to compute and print it. --- diff --git a/command.c b/command.c index 8fdb839a..bbe0441b 100644 --- a/command.c +++ b/command.c @@ -234,7 +234,7 @@ int com_si(struct rc4_context *rc4c, int argc, __a_unused char * const * argv) { int i, ret; char *ut; - char *sender_info = NULL, *sender_list = NULL; + char *sender_info = NULL; if (argc != 1) return -E_COMMAND_SYNTAX; @@ -243,8 +243,6 @@ int com_si(struct rc4_context *rc4c, int argc, __a_unused char * const * argv) char *info = senders[i].info(); sender_info = para_strcat(sender_info, info); free(info); - sender_list = para_strcat(sender_list, senders[i].name); - sender_list = para_strcat(sender_list, " "); } ut = uptime_str(); ret = rc4_send_va_buffer(rc4c, "up: %s\nplayed: %u\n" @@ -253,7 +251,6 @@ int com_si(struct rc4_context *rc4c, int argc, __a_unused char * const * argv) "connections (active/accepted/total): %u/%u/%u\n" "current loglevel: %s\n" "supported audio formats: %s\n" - "supported senders: %s\n" "%s", ut, mmd->num_played, (int)getppid(), @@ -263,12 +260,10 @@ int com_si(struct rc4_context *rc4c, int argc, __a_unused char * const * argv) mmd->num_connects, conf.loglevel_arg, supported_audio_formats(), - sender_list, sender_info ); mutex_unlock(mmd_mutex); free(ut); - free(sender_list); free(sender_info); return ret; }