[asterisk-dev] [Code Review] 4356: realtime: Updates fail to work due to update fields being passed over for lookup fields
Joshua Colp
reviewboard at asterisk.org
Fri Jan 23 11:59:40 CST 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4356/#review14274
-----------------------------------------------------------
Ship it!
Ship It!
- Joshua Colp
On Jan. 20, 2015, 3:10 a.m., Matt Jordan wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4356/
> -----------------------------------------------------------
>
> (Updated Jan. 20, 2015, 3:10 a.m.)
>
>
> Review request for Asterisk Developers and Joshua Colp.
>
>
> Bugs: ASTERISK-24626
> https://issues.asterisk.org/jira/browse/ASTERISK-24626
>
>
> Repository: Asterisk
>
>
> Description
> -------
>
> When a crash was fixed due to usage of the REALTIME function (see ASTERISK-24231 and https://reviewboard.asterisk.org/r/3985/), an apparent glitch was introduced into ast_update2_realtime where the update fields passed to the function would be skipped and the lookup field processed twice.
>
> The usage of this function is a bit interesting: A variable argument list is used with two sentinel values - the first marks the end of the lookup fields/values; the second marks the end of the update fields/values. A typical call looks like this:
>
> ./apps/app_voicemail.c: if (ast_update2_realtime("voicemail", "context", vmu->context, "mailbox", vmu->mailbox, SENTINEL, "password", password, SENTINEL) > 0) {
>
> Unfortunately, ast_update2_realtime parses over the lookup fields twice, as opposed to parsing over the update fields. This causes the lookups to succeed, but the updates itself to have no effect.
>
> Thanks to the issue reporter, Paddy Grice, for pointing out the problem.
>
>
> Diffs
> -----
>
> /branches/13/main/config.c 430800
>
> Diff: https://reviewboard.asterisk.org/r/4356/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Matt Jordan
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150123/e4ecab16/attachment.html>
More information about the asterisk-dev
mailing list