[asterisk-dev] [Code Review] 3335: [res_config_odbc] Fix for nullable integer columns and keyfield existence check in update_odbc
zvision
reviewboard at asterisk.org
Fri Mar 28 12:09:17 CDT 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3335/
-----------------------------------------------------------
(Updated March 28, 2014, 12:09 p.m.)
Status
------
This change has been marked as submitted.
Review request for Asterisk Developers.
Changes
-------
Committed in revision 411515
Bugs: ASTERISK-23459
https://issues.asterisk.org/jira/browse/ASTERISK-23459
Repository: Asterisk
Description
-------
This patch fixes setting nullable integer columns to NULL instead of an empty string, which fails for PostgreSQL, for example.
The current code is supposed to do so, but the check is broken. The patch also allows the first column in the list to be a nullable integer.
Also, the check for existence of a mandatory column checked for the first column in the list instead of the key field lookup column.
Diffs
-----
http://svn.asterisk.org/svn/asterisk/trunk/res/res_config_odbc.c 410980
Diff: https://reviewboard.asterisk.org/r/3335/diff/
Testing
-------
Tested by me. Use case scenario: Asterisk + res_odbc + PostgreSQL backend, SIP realtime peers + regs.
When a 'port' column in SIP regs (I assume this also applies when using sippeers only) is a nullable integer,
Asterisk tries to write an empty string here during SIP endpoint deregistration.
Thanks,
zvision
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140328/2d595820/attachment.html>
More information about the asterisk-dev
mailing list