X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=command.c;h=f462016b2e572f6a58691362cb52c9bdb280ea91;hp=bcbbc3406def48eba64adeb31eecd81997f634b2;hb=9417eae5ca2b9f10d25f769221e8fd91048bc68a;hpb=f32c0776882e01913c64c8ccbf2d94e0fb4d6369 diff --git a/command.c b/command.c index bcbbc340..f462016b 100644 --- a/command.c +++ b/command.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2010 Andre Noll + * Copyright (C) 1997-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -13,6 +13,7 @@ #include #include #include +#include #include "para.h" #include "error.h" @@ -268,7 +269,7 @@ int com_si(struct rc4_context *rc4c, int argc, __a_unused char * const * argv) mmd->num_commands, mmd->num_connects, conf.loglevel_arg, - supported_audio_formats(), + SERVER_AUDIO_FORMATS, sender_info ); mutex_unlock(mmd_mutex); @@ -457,10 +458,8 @@ int com_help(struct rc4_context *rc4c, int argc, char * const * argv) } /* argument given for help */ cmd = get_cmd_ptr(argv[1], &handler); - if (!cmd) { - free(handler); + if (!cmd) return -E_BAD_CMD; - } perms = cmd_perms_itohuman(cmd->perms); ret = rc4_send_va_buffer(rc4c, "%s - %s\n\n"