From 08ba504e994f355f01db0b5e983bc8e4f8f59346 Mon Sep 17 00:00:00 2001 From: sungtae kim <sungtae@messagebird.com> Date: Fri, 15 Feb 2019 00:09:30 +0100 Subject: [PATCH] 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 --- channels/pjsip/cli_commands.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/channels/pjsip/cli_commands.c b/channels/pjsip/cli_commands.c index 33d0e02c11..7e932da63c 100644 --- a/channels/pjsip/cli_commands.c +++ b/channels/pjsip/cli_commands.c @@ -354,7 +354,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->name); - return -1; + return 0; } ast_channel_lock(channel); @@ -364,7 +364,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->name); ast_channel_unlock(channel); ao2_cleanup(channel); - return -1; + return 0; } media = session->active_media_state->default_session[AST_MEDIA_TYPE_AUDIO]; @@ -372,7 +372,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->name); ast_channel_unlock(channel); ao2_cleanup(channel); - return -1; + return 0; } rtp = ao2_bump(media->rtp); -- GitLab