diff options
author | George Joseph <gjoseph@digium.com> | 2017-02-20 07:04:25 -0700 |
---|---|---|
committer | George Joseph <gjoseph@digium.com> | 2017-02-20 08:07:31 -0600 |
commit | ffa7d697661ac37879f438841ae9af057b2baa55 (patch) | |
tree | ef5242db18fc22d7e42598e95626c036c335c85d /res/res_pjsip | |
parent | a6225d100eecfef74172ef308b7eb066e19488e5 (diff) |
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
Diffstat (limited to 'res/res_pjsip')
-rw-r--r-- | res/res_pjsip/pjsip_cli.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/res/res_pjsip/pjsip_cli.c b/res/res_pjsip/pjsip_cli.c index e6433f435..56ec191ed 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); |