[asterisk-commits] rmudgett: branch 13 r432894 - /branches/13/res/res_pjsip/pjsip_configuration.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Mar 13 12:04:48 CDT 2015


Author: rmudgett
Date: Fri Mar 13 12:04:43 2015
New Revision: 432894

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=432894
Log:
chan_pjsip: AMI action PJSIPShowEndpoint closes AMI connection on error.

Also fixed similar problem with AMI action PJSIPShowEndpoints.

ASTERISK-24872 #close
Reported by: Dmitriy Serov

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

Modified:
    branches/13/res/res_pjsip/pjsip_configuration.c

Modified: branches/13/res/res_pjsip/pjsip_configuration.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/res/res_pjsip/pjsip_configuration.c?view=diff&rev=432894&r1=432893&r2=432894
==============================================================================
--- branches/13/res/res_pjsip/pjsip_configuration.c (original)
+++ branches/13/res/res_pjsip/pjsip_configuration.c Fri Mar 13 12:04:43 2015
@@ -1159,7 +1159,7 @@
 		      ast_sip_get_sorcery(), "endpoint", endpoint_name))) {
 		astman_send_error_va(s, m, "Unable to retrieve endpoint %s\n",
 			endpoint_name);
-		return -1;
+		return 0;
 	}
 
 	astman_send_listack(s, m, "Following are Events for each object "
@@ -1199,7 +1199,7 @@
 		 ast_sip_create_ami_event("EndpointList", ami), ast_free);
 
 	if (!buf) {
-		return -1;
+		return CMP_STOP;
 	}
 
 	sip_sorcery_object_ami_set_type_name(endpoint, &buf);
@@ -1238,7 +1238,8 @@
 
 	endpoints = ast_sip_get_endpoints();
 	if (!endpoints) {
-		return -1;
+		astman_send_error(s, m, "Could not get endpoints\n");
+		return 0;
 	}
 
 	if (!(num = ao2_container_count(endpoints))) {




More information about the asterisk-commits mailing list