summaryrefslogtreecommitdiff
path: root/res/res_pjsip/location.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2015-09-09 05:52:53 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2015-09-09 05:52:54 -0500
commit34ad877bac16e70bf6c6ac8d881716e6b25f5b07 (patch)
treed80ca0f8adf0489b988156a813c2f5081fdb7dd0 /res/res_pjsip/location.c
parent777f9adfc7be50b634e0b131af611ac936f9cca8 (diff)
parent5469caa9ddf002d2e75b5fe5dec0c4dbebea1d1e (diff)
Merge "res_pjsip: Use hash for contact object identity instead of Contact URI." into 13
Diffstat (limited to 'res/res_pjsip/location.c')
-rw-r--r--res/res_pjsip/location.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/res/res_pjsip/location.c b/res/res_pjsip/location.c
index fe7046703..587e38adf 100644
--- a/res/res_pjsip/location.c
+++ b/res/res_pjsip/location.c
@@ -269,8 +269,10 @@ int ast_sip_location_add_contact(struct ast_sip_aor *aor, const char *uri,
{
char name[MAX_OBJECT_FIELD * 2 + 3];
RAII_VAR(struct ast_sip_contact *, contact, NULL, ao2_cleanup);
+ char hash[33];
- snprintf(name, sizeof(name), "%s;@%s", ast_sorcery_object_get_id(aor), uri);
+ ast_md5_hash(hash, uri);
+ snprintf(name, sizeof(name), "%s;@%s", ast_sorcery_object_get_id(aor), hash);
if (!(contact = ast_sorcery_alloc(ast_sip_get_sorcery(), "contact", name))) {
return -1;