From: sungtae kim Date: Thu, 14 Feb 2019 23:09:30 +0000 (+0100) Subject: chan_pjsip: Changed to continued after invalid media for pjsip show channelstats X-Git-Tag: 17.0.0-rc1~181^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb651756c7fe99aea67a55134c19076a759b46f6;p=thirdparty%2Fasterisk.git chan_pjsip: Changed to continued after invalid media for pjsip show channelstats Currently, the pjsip show channelstats cli does not show channel's stats after hits the invalid channel info. This makes hard to use this cli. Changed to keep iterate after hits the invalid channel info. ASTERISK-28292 Change-Id: I3efdff1c9e1b1efd3c971fb82ae77aa133a6f43c --- diff --git a/channels/pjsip/cli_commands.c b/channels/pjsip/cli_commands.c index 2ce236997a..32506075d3 100644 --- a/channels/pjsip/cli_commands.c +++ b/channels/pjsip/cli_commands.c @@ -352,7 +352,7 @@ static int cli_channelstats_print_body(void *obj, void *arg, int flags) if (!channel) { ast_str_append(&context->output_buffer, 0, " %s not valid\n", snapshot->base->name); - return -1; + return 0; } ast_channel_lock(channel); @@ -362,7 +362,7 @@ static int cli_channelstats_print_body(void *obj, void *arg, int flags) ast_str_append(&context->output_buffer, 0, " %s not valid\n", snapshot->base->name); ast_channel_unlock(channel); ao2_cleanup(channel); - return -1; + return 0; } media = session->active_media_state->default_session[AST_MEDIA_TYPE_AUDIO]; @@ -370,7 +370,7 @@ static int cli_channelstats_print_body(void *obj, void *arg, int flags) ast_str_append(&context->output_buffer, 0, " %s not valid\n", snapshot->base->name); ast_channel_unlock(channel); ao2_cleanup(channel); - return -1; + return 0; } rtp = ao2_bump(media->rtp);