-
Notifications
You must be signed in to change notification settings - Fork 932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug]: app_voicemail_imap wrong behavior when losing IMAP connection #64
Comments
@jcolp should I delete unlicensed code? |
@seanbright Since there is no CLA checking on patch attachments on issues yes, I think removing the patch is the best way to ensure that the licensing remains clean and noone tries to PR it themselves without proper licensing. |
@OlafTitz - I had to remove your patch because we do not have CLA checking on issues yet. If you put up a PR and sign the CLA we will be able to get the patch integrated. |
I'll try. From first reading, the required workflow is extraordinarily complicated and needs tooling with which I'm not familiar. |
Our workflow is the standard Github pull request workflow, with added comments to specify what other branches the change should go into. We require all code changes to have a CLA associated with it. |
Some callers of __messagecount did not correctly handle error return, instead returning a -1 message count. This caused a notification with "Messages-Waiting: yes" and "Voice-Message: -1/0 (0/0)" if the IMAP server was unavailable. Fixes: asterisk#64
Some callers of __messagecount did not correctly handle error return, instead returning a -1 message count. This caused a notification with "Messages-Waiting: yes" and "Voice-Message: -1/0 (0/0)" if the IMAP server was unavailable. Fixes: #64
Some callers of __messagecount did not correctly handle error return, instead returning a -1 message count. This caused a notification with "Messages-Waiting: yes" and "Voice-Message: -1/0 (0/0)" if the IMAP server was unavailable. Fixes: #64
Some callers of __messagecount did not correctly handle error return, instead returning a -1 message count. This caused a notification with "Messages-Waiting: yes" and "Voice-Message: -1/0 (0/0)" if the IMAP server was unavailable. Fixes: #64
Severity
Minor
Versions
18.14.0
Components/Modules
app_voicemail_imap
Operating Environment
Ubuntu 22.04
Frequency of Occurrence
Frequent
Issue Description
Seen by user: When the IMAP server is down, a wrong MWI is delivered. My desk phone shows 2 waiting messages (when there were none previously).
Apparent cause: the function static int messagecount(const char *mailbox_id, const char *folder) just returns the result from calling __messagecount(context, mailbox, folder). But that can be negative in case of error. Then the clients get a NOTIFY with "-1" messages waiting. The function has_voicemail(const char *mailbox, const char *folder) similarly checks for the result of __messagecount being != 0 instead of >0.
This happens when the IMAP connection is lost and can't be reestablished (e.g. IMAP server shut down), but judging from the code it can happen in other error situations too.
Relevant log output
Asterisk Issue Guidelines
The text was updated successfully, but these errors were encountered: