Merge "app_voicemail: Cleanup mailbox topic and cache" into 16

This commit is contained in:
George Joseph 2018-09-24 10:08:41 -05:00 committed by Gerrit Code Review
commit 82f28106df
2 changed files with 7 additions and 0 deletions

View File

@ -2020,6 +2020,10 @@ static void free_user(struct ast_vm_user *vmu)
return;
}
if (!ast_strlen_zero(vmu->mailbox)) {
ast_delete_mwi_state_full(vmu->mailbox, vmu->context, NULL);
}
ast_free(vmu->email);
vmu->email = NULL;
ast_free(vmu->emailbody);

View File

@ -3344,6 +3344,9 @@ int ast_delete_mwi_state_full(const char *mailbox, const char *context, struct a
if (clear_msg) {
stasis_publish(mailbox_specific_topic, clear_msg);
}
stasis_topic_pool_delete_topic(mwi_topic_pool, stasis_topic_name(mailbox_specific_topic));
ao2_cleanup(clear_msg);
return 0;
}