[svn-commits] mmichelson: trunk r397109 - /trunk/res/res_pjsip_endpoint_identifier_ip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Aug 20 10:32:22 CDT 2013


Author: mmichelson
Date: Tue Aug 20 10:32:20 2013
New Revision: 397109

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=397109
Log:
Add debug message to res_pjsip_endpoint_identifier_ip to indicate when an endpoint is successfully retrieved.

(closes issue ASTERISK-22101)
reported by Rusty Newton


Modified:
    trunk/res/res_pjsip_endpoint_identifier_ip.c

Modified: trunk/res/res_pjsip_endpoint_identifier_ip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_endpoint_identifier_ip.c?view=diff&rev=397109&r1=397108&r2=397109
==============================================================================
--- trunk/res/res_pjsip_endpoint_identifier_ip.c (original)
+++ trunk/res/res_pjsip_endpoint_identifier_ip.c Tue Aug 20 10:32:20 2013
@@ -98,6 +98,7 @@
 	struct ast_sockaddr addr = { { 0, } };
 	RAII_VAR(struct ao2_container *, candidates, NULL, ao2_cleanup);
 	RAII_VAR(struct ip_identify_match *, match, NULL, ao2_cleanup);
+	struct ast_sip_endpoint *endpoint;
 
 	/* If no possibilities exist return early to save some time */
 	if (!(candidates = ast_sorcery_retrieve_by_fields(ast_sip_get_sorcery(), "identify", AST_RETRIEVE_FLAG_MULTIPLE | AST_RETRIEVE_FLAG_ALL, NULL)) ||
@@ -112,7 +113,12 @@
 		return NULL;
 	}
 
-	return ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint", match->endpoint_name);
+	endpoint = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint", match->endpoint_name);
+	if (endpoint) {
+		ast_debug(3, "Retrieved endpoint %s\n", ast_sorcery_object_get_id(endpoint));
+	}
+
+	return endpoint;
 }
 
 static struct ast_sip_endpoint_identifier ip_identifier = {




More information about the svn-commits mailing list