Skip to content
Snippets Groups Projects
Commit e3f1dbd9 authored by Joshua Colp's avatar Joshua Colp Committed by Gerrit Code Review
Browse files

Merge "res/res_pjsip_location: Delete contact_status object when contact is deleted"

parents 6b08f01c 2df4ad64
No related branches found
No related tags found
No related merge requests found
......@@ -317,6 +317,14 @@ int ast_sip_location_update_contact(struct ast_sip_contact *contact)
int ast_sip_location_delete_contact(struct ast_sip_contact *contact)
{
void *contact_status_obj;
contact_status_obj = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), CONTACT_STATUS, ast_sorcery_object_get_id(contact));
if (contact_status_obj) {
ast_sorcery_delete(ast_sip_get_sorcery(), contact_status_obj);
ao2_ref(contact_status_obj, -1);
}
return ast_sorcery_delete(ast_sip_get_sorcery(), contact);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment