[asterisk-dev] [Code Review] 3375: [res_config_odbc/res_odbc] Fixed handling of non-text columns updates with empty values

zvision reviewboard at asterisk.org
Mon Mar 24 04:39:19 CDT 2014



> On March 23, 2014, 3:26 p.m., wdoekes wrote:
> > http://svn.asterisk.org/svn/asterisk/branches/11/res/res_config_odbc.c, line 533
> > <https://reviewboard.asterisk.org/r/3375/diff/1/?file=56218#file56218line533>
> >
> >     Please move the (non-inline) ast_odbc function call to the back so we can avoid the call for char-columns.
> >     
> >     Also, we don't need to check tableptr, since column would be NULL if it was false.
> 
> zvision wrote:
>     I also moved the check for text column to a separate inline function.

The check for tableptr is neccessary when count > 63.


- zvision


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


On March 24, 2014, 9:31 a.m., zvision wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3375/
> -----------------------------------------------------------
> 
> (Updated March 24, 2014, 9:31 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-23459
>     https://issues.asterisk.org/jira/browse/ASTERISK-23459
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This review request is a patch for the issue reviewed in https://reviewboard.asterisk.org/r/3335 but for non-trunk versions.
> 
> Changes:
> - correct check for keyfield existence,
> - new res_odbc.conf variable allow_empty_string_in_nontext,
> - proper empty string => NULL conversion with allow_empty_string_in_nontext option disabled
>   for non-text columns.
> 
> This patch is based on branch 11 svn, but code for 1.8 and 10 is the same, so it should apply with no problems.
> 
> 
> Diffs
> -----
> 
>   http://svn.asterisk.org/svn/asterisk/branches/11/res/res_odbc.exports.in 411017 
>   http://svn.asterisk.org/svn/asterisk/branches/11/res/res_odbc.c 411017 
>   http://svn.asterisk.org/svn/asterisk/branches/11/res/res_config_odbc.c 411017 
>   http://svn.asterisk.org/svn/asterisk/branches/11/include/asterisk/res_odbc.h 411017 
>   http://svn.asterisk.org/svn/asterisk/branches/11/configs/res_odbc.conf.sample 411017 
> 
> Diff: https://reviewboard.asterisk.org/r/3375/diff/
> 
> 
> Testing
> -------
> 
> Tested with Asterisk 11 + ODBC + SIP realtime + PostgreSQL with both allow_empty_string_in_nontext settings
> to ensure no regression is introduced.
> 
> 
> Thanks,
> 
> zvision
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140324/0a221782/attachment-0001.html>


More information about the asterisk-dev mailing list