[asterisk-dev] [Code Review] Add unique message IDs to IMAP voicemail

Matt Jordan reviewboard at asterisk.org
Wed May 30 15:57:23 CDT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1945/#review6351
-----------------------------------------------------------



/team/mmichelson/trunk-digiumphones/apps/app_voicemail.c
<https://reviewboard.asterisk.org/r/1945/#comment11855>

    Blob



/team/mmichelson/trunk-digiumphones/apps/app_voicemail.c
<https://reviewboard.asterisk.org/r/1945/#comment11858>

    Both mail_copy and imap_store_file can theoretically fail - this would mean we would delete the original message and not replace it with the new one.  Only perform vm_imap_delete if imap_store_file and save_to_folder succeed.
    



/team/mmichelson/trunk-digiumphones/apps/app_voicemail.c
<https://reviewboard.asterisk.org/r/1945/#comment11856>

    There's no need to call save_to_folder if the message was in INBOX to begin with.



/team/mmichelson/trunk-digiumphones/apps/app_voicemail.c
<https://reviewboard.asterisk.org/r/1945/#comment11860>

    Granted, the previous code that replaces the IMAP messages should prevent this, but...
    
    Since X-Asterisk-VM-Message-ID may not exist, you may want to check if get_header_by_tag returns NULL.  If it does return NULL, buf will have whatever it had previously in it, which means - as the code is currently written - the msg_id may get set to the flag value.
    
    If get_header_by_tag returns NULL, we may want to auto assign a message ID here, or at least log something and complain.



/team/mmichelson/trunk-digiumphones/apps/app_voicemail.c
<https://reviewboard.asterisk.org/r/1945/#comment11861>

    Blob


- Matt


On May 23, 2012, 3:46 p.m., Mark Michelson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1945/
> -----------------------------------------------------------
> 
> (Updated May 23, 2012, 3:46 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This review has two main parts to it.
> 
> 1) IMAP voicemail storage now supports unique message IDs like the other storage backends.
> 2) Old IMAP voicemails that do not have a unique message ID can be updated to have one now. This involves deleting the old message, creating a new one, and then storing that message in the appropriate folder. Comments in the code explain what is going on.
> 
> 
> Diffs
> -----
> 
>   /team/mmichelson/trunk-digiumphones/apps/app_voicemail.c 367360 
> 
> Diff: https://reviewboard.asterisk.org/r/1945/diff
> 
> 
> Testing
> -------
> 
> Admittedly, this has only undergone a compilation test.
> 
> 
> Thanks,
> 
> Mark
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120530/50e9a27f/attachment-0001.htm>


More information about the asterisk-dev mailing list