diff options
author | Joshua Colp <jcolp@digium.com> | 2015-09-09 05:53:02 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2015-09-09 05:53:02 -0500 |
commit | 647cdcd6a8f5e5dd9b9361929a3c9e4c9d5a8fa3 (patch) | |
tree | e99f08dc3ca501d07073c4f2ca95ded69662b375 /res | |
parent | 0b63c2969f0ed487c73b88e0435378dd5f64bccd (diff) | |
parent | 3628e380b806b57c4699e121636bc2814cb6fd08 (diff) |
Merge "res_pjsip: Use hash for contact object identity instead of Contact URI."
Diffstat (limited to 'res')
-rw-r--r-- | res/res_pjsip/location.c | 4 |
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; |