Author: gtjoseph
Date: Mon Sep 29 16:59:46 2014
New Revision: 424129

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=424129
Log:
pjsip_cli: Suppress header print on error or no objects

If there's an error on the pjsip command line or there are no objects, don't
print the column headers.

ASTERISK-24350 #close
Reported-by: Brad Latus
Tested-by: George Joseph
Tested-by: Brad Latus

Review: https://reviewboard.asterisk.org/r/4025/
........

Merged revisions 424128 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    branches/13/   (props changed)
    branches/13/res/res_pjsip/pjsip_cli.c

Propchange: branches/13/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: branches/13/res/res_pjsip/pjsip_cli.c
URL: 
http://svnview.digium.com/svn/asterisk/branches/13/res/res_pjsip/pjsip_cli.c?view=diff&rev=424129&r1=424128&r2=424129
==============================================================================
--- branches/13/res/res_pjsip/pjsip_cli.c (original)
+++ branches/13/res/res_pjsip/pjsip_cli.c Mon Sep 29 16:59:46 2014
@@ -198,21 +198,21 @@
 
        if (is_container) {
                if (!ao2_container_count(container)) {
-                       dump_str_and_free(a->fd, context.output_buffer);
+                       ast_free(context.output_buffer);
                        ast_cli(a->fd, "No objects found.\n\n");
                        return CLI_SUCCESS;
                }
                ao2_callback(container, OBJ_NODATA, 
formatter_entry->print_body, &context);
        } else {
                if (ast_strlen_zero(object_id)) {
-                       dump_str_and_free(a->fd, context.output_buffer);
+                       ast_free(context.output_buffer);
                        ast_cli(a->fd, "No object specified.\n");
                        return CLI_FAILURE;
                }
 
                object = formatter_entry->retrieve_by_id(object_id);
                if (!object) {
-                       dump_str_and_free(a->fd, context.output_buffer);
+                       ast_free(context.output_buffer);
                        ast_cli(a->fd, "Unable to find object %s.\n\n", 
object_id);
                        return CLI_SUCCESS;
                }


-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/svn-commits

Reply via email to