summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorJenkins2 <jenkins2@gerrit.asterisk.org>2018-01-09 08:23:57 -0600
committerGerrit Code Review <gerrit2@gerrit.digium.api>2018-01-09 08:23:57 -0600
commit2f8ae566512897c97b3369bab3f07ff836f5ad1c (patch)
treea4742cc90d69a3154c87d549b5853afba301836a /res
parent2e4bd3a8d5bf6da6da58fe09bc7697adbdd97217 (diff)
parent705e6c04b3aec541901b4c592df46af3a2924d23 (diff)
Merge "res_pjsip.c: Fix endpoint identifier registration name search."
Diffstat (limited to 'res')
-rw-r--r--res/res_pjsip.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index c3deb98b1..654f4ba4e 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -2680,13 +2680,13 @@ int ast_sip_register_endpoint_identifier_with_name(struct ast_sip_endpoint_ident
id_list_item = ast_calloc(1, sizeof(*id_list_item));
if (!id_list_item) {
- ast_log(LOG_ERROR, "Unabled to add endpoint identifier. Out of memory.\n");
+ ast_log(LOG_ERROR, "Unable to add endpoint identifier. Out of memory.\n");
return -1;
}
id_list_item->identifier = identifier;
id_list_item->name = name;
- ast_debug(1, "Register endpoint identifier %s (%p)\n", name, identifier);
+ ast_debug(1, "Register endpoint identifier %s(%p)\n", name ?: "", identifier);
if (ast_strlen_zero(name)) {
/* if an identifier has no name then place in front */
@@ -2709,7 +2709,8 @@ int ast_sip_register_endpoint_identifier_with_name(struct ast_sip_endpoint_ident
id_list_item->priority = 0;
while ((current = strchr(current, ','))) {
++id_list_item->priority;
- if (!strncmp(prev, name, current - prev)) {
+ if (!strncmp(prev, name, current - prev)
+ && strlen(name) == current - prev) {
break;
}
prev = ++current;