]> git.ipfire.org Git - thirdparty/asterisk.git/commit
app_voicemail: Don't delete mailbox state unless mailbox is deleted
authorGeorge Joseph <gjoseph@digium.com>
Tue, 18 Dec 2018 16:33:50 +0000 (09:33 -0700)
committerGeorge Joseph <gjoseph@digium.com>
Tue, 18 Dec 2018 16:33:50 +0000 (09:33 -0700)
commite137086163b00ce4947aa9335aae7f45956bbe75
tree6b659fdc8df6328fedabdfe4e336c6ced9d310b1
parentead94ad6213ce91b42151639fa6d10b5d8b8066b
app_voicemail:  Don't delete mailbox state unless mailbox is deleted

The free_user function was automatically deleting the stasis mailbox
state but this only makes sense when the mailbox is actually
deleted, not just the structure freed.  This was causing issues
where leave_voicemail would publish the mwi message to stasis and
delete the state before the message could be processed by
res_pjsip_mwi.

* Removed the delete of state from free_user().

* Created a new free_user_final() function that both frees the data
  structure and deletes the state.  This function is only called
  during module load/unload where it's appropriate to delete the
  state.

ASTERISK-28215

Change-Id: I305e8b3c930e9ac41d901e5dc8a58fd7904d98dd
apps/app_voicemail.c