[Asterisk-code-review] pjproject cli: Add object count after object lists (asterisk[master])

George Joseph asteriskteam at digium.com
Mon Feb 20 08:06:45 CST 2017


George Joseph has uploaded a new change for review. ( https://gerrit.asterisk.org/5024 )

Change subject: pjproject cli:  Add object count after object lists
......................................................................

pjproject cli:  Add object count after object lists

When listing a container, we not print the number of object
in the container at the end of the list.

Change-Id: I791cbc3ee9da9a2af9adc655164b5d32953df812
---
M res/res_pjsip/pjsip_cli.c
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/24/5024/1

diff --git a/res/res_pjsip/pjsip_cli.c b/res/res_pjsip/pjsip_cli.c
index e6433f4..56ec191 100644
--- a/res/res_pjsip/pjsip_cli.c
+++ b/res/res_pjsip/pjsip_cli.c
@@ -221,6 +221,8 @@
 			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);

-- 
To view, visit https://gerrit.asterisk.org/5024
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I791cbc3ee9da9a2af9adc655164b5d32953df812
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: George Joseph <gjoseph at digium.com>



More information about the asterisk-code-review mailing list