summaryrefslogtreecommitdiff
path: root/res/res_pjsip_endpoint_identifier_ip.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2013-08-20 15:32:20 +0000
committerMark Michelson <mmichelson@digium.com>2013-08-20 15:32:20 +0000
commited19b8ee76f4f5d51511ba6a99496166a8017cdd (patch)
treebf3a84bc8d61cd9ab312ca4da31731aa3fcbaaab /res/res_pjsip_endpoint_identifier_ip.c
parent8931502f7a1593a86d741e739069bb96086dcc7c (diff)
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 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip_endpoint_identifier_ip.c')
-rw-r--r--res/res_pjsip_endpoint_identifier_ip.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/res/res_pjsip_endpoint_identifier_ip.c b/res/res_pjsip_endpoint_identifier_ip.c
index a2d690b25..f3bccfa7d 100644
--- a/res/res_pjsip_endpoint_identifier_ip.c
+++ b/res/res_pjsip_endpoint_identifier_ip.c
@@ -98,6 +98,7 @@ static struct ast_sip_endpoint *ip_identify(pjsip_rx_data *rdata)
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 @@ static struct ast_sip_endpoint *ip_identify(pjsip_rx_data *rdata)
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 = {