[asterisk-dev] [Code Review]: fix sqlite crash on unset config_table / unbreak sqlite realtime_multi_handler

wdoekes reviewboard at asterisk.org
Thu Nov 3 15:51:53 CDT 2011



> On Nov. 2, 2011, 5:24 p.m., Terry Wilson wrote:
> > I ran into this as well back when testing the realtime stuff, but never got around to fixing it. Looks good. I leave it to your discretion if you think adding a macro for the duplicated logic for generating the string is a good idea. I don't really care much either way.

I thought about it, but it really meant moving the QUERY up to top, separating them into two #defines (one with and one without commented=0) but now the QUERY is not near enough so you can quickly look at the %conversion specifications. And the other #define QUERY's that would be left would be less consistent and moving them to top would only make things worse.

I left it as-is.


- wdoekes


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


On Nov. 2, 2011, 3:48 p.m., wdoekes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1561/
> -----------------------------------------------------------
> 
> (Updated Nov. 2, 2011, 3:48 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> Bugs
> https://issues.asterisk.org/jira/browse/ASTERISK-18354 and
> https://issues.asterisk.org/jira/browse/ASTERISK-18355
> concern crashes and failure to return realtime multientry results.
> 
> The bug reports should be self-explanatory, but here's a summary:
> (1) config_table is not guaranteed to be non-NULL => crash
> (2) multientry lookups assume a 'commented' column exists -- it should only do that if the table == config_table
> 
> 
> This addresses bugs ASTERISK-18354 and ASTERISK-18355.
>     https://issues.asterisk.org/jira/browse/ASTERISK-18354
>     https://issues.asterisk.org/jira/browse/ASTERISK-18355
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/res/res_config_sqlite.c 343156 
> 
> Diff: https://reviewboard.asterisk.org/r/1561/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> wdoekes
> 
>

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


More information about the asterisk-dev mailing list