[Asterisk-code-review] app voicemail: avoid race on IMAP logout (asterisk[master])
Alexei Gradinari
asteriskteam at digium.com
Fri Jun 16 10:45:38 CDT 2017
Alexei Gradinari has uploaded this change for review. ( https://gerrit.asterisk.org/5868
Change subject: app_voicemail: avoid race on IMAP logout
......................................................................
app_voicemail: avoid race on IMAP logout
Need to lock IMAP vm_state to avoid race condition.
ASTERISK-24052 #close
Change-Id: Id33ef3363cc7eeeb3e5ebb37b8f5566c711d9486
---
M apps/app_voicemail.c
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/68/5868/1
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 8f50e11..caffef2 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -13134,7 +13134,10 @@
return;
}
+ ast_mutex_lock(&vms->lock);
vms->mailstream = mail_close(vms->mailstream);
+ ast_mutex_unlock(&vms->lock);
+
vmstate_delete(vms);
}
--
To view, visit https://gerrit.asterisk.org/5868
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id33ef3363cc7eeeb3e5ebb37b8f5566c711d9486
Gerrit-Change-Number: 5868
Gerrit-PatchSet: 1
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170616/867d3f48/attachment.html>
More information about the asterisk-code-review
mailing list