[asterisk-dev] [Code Review] app_voicemail: fix problem where we kill the msg_id of a message when changing its folder in odbc storage.

Mark Michelson reviewboard at asterisk.org
Thu Jan 10 17:36:29 CST 2013


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

Ship it!


Looks good by me. I don't think the message ID was ever intended to be unique across systems.

For trunk you may consider just using a UUID instead of the current system for generating IDs.


/branches/11/apps/app_voicemail.c
<https://reviewboard.asterisk.org/r/2220/#comment14597>

    Since you assign the result of the ast_atomic_fetchadd_int() into an int and then end up printing the hex representation of the value, you can change msg_id_incrementor to just be an int so you can get rid of this cast.


- Mark


On Jan. 3, 2013, 3:10 p.m., jrose wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2220/
> -----------------------------------------------------------
> 
> (Updated Jan. 3, 2013, 3:10 p.m.)
> 
> 
> Review request for Asterisk Developers, Mark Michelson, Matt Jordan, and kmoore.
> 
> 
> Summary
> -------
> 
> When a message is moved between folders (such as after listening to new messages, they are switched to the old messages folder), the msg_id field added in Asterisk 11 isn't copied. This patch simply adds that field to what is copied in the odbc COPY function and appears to solve the problem.
> 
> 
> This addresses bug ASTERISK-20717.
>     https://issues.asterisk.org/jira/browse/ASTERISK-20717
> 
> 
> Diffs
> -----
> 
>   /branches/11/apps/app_voicemail.c 378414 
> 
> Diff: https://reviewboard.asterisk.org/r/2220/diff
> 
> 
> Testing
> -------
> 
> Made messages in a mailbox using app_voicemail. Checked mysql to see the msg_id. Verified an ID was created.
> Listened to messages, made sure the COPY function was invoked. Checked mysql again and saw that the IDs were gone.
> 
> Applied the patch, repeated the process, the IDs remained intact.
> 
> 
> Thanks,
> 
> jrose
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130110/5faf2461/attachment.htm>


More information about the asterisk-dev mailing list