From: George Joseph Date: Mon, 20 Feb 2017 14:04:25 +0000 (-0700) Subject: pjproject cli: Add object count after object lists X-Git-Tag: 13.15.0-rc1~76^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9ea98f9bf3a91d1fdfafc754d2ce6a6147c1d70;p=thirdparty%2Fasterisk.git pjproject cli: Add object count after object lists When listing a container, we now print the number of objects in the container at the end of the list. Change-Id: I791cbc3ee9da9a2af9adc655164b5d32953df812 --- diff --git a/res/res_pjsip/pjsip_cli.c b/res/res_pjsip/pjsip_cli.c index e6433f4358..56ec191edd 100644 --- a/res/res_pjsip/pjsip_cli.c +++ b/res/res_pjsip/pjsip_cli.c @@ -221,6 +221,8 @@ char *ast_sip_cli_traverse_objects(struct ast_cli_entry *e, int cmd, struct ast_ return CLI_SUCCESS; } ao2_callback(container, OBJ_NODATA, formatter_entry->print_body, &context); + ast_str_append(&context.output_buffer, 0, "\nObjects found: %d\n", ao2_container_count(container)); + } else { if (ast_strlen_zero(object_id)) { ast_free(context.output_buffer);