[asterisk-dev] [Code Review] 3346: [res_config_pgsql] Correct handling of nullable int fields in update_realtime

wdoekes reviewboard at asterisk.org
Sun Mar 23 10:46:11 CDT 2014


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


Minor nits. Still waiting for someone to test this.


http://svn.asterisk.org/svn/asterisk/branches/1.8/res/res_config_pgsql.c
<https://reviewboard.asterisk.org/r/3346/#comment20976>

    column is never NULL.



http://svn.asterisk.org/svn/asterisk/branches/1.8/res/res_config_pgsql.c
<https://reviewboard.asterisk.org/r/3346/#comment20977>

    I don't mind the !column->notnull as much as the ugly list of strncmps below that.
    
    If we're adding inline functions, what about is_text(column)? :)


- wdoekes


On March 17, 2014, 4:23 p.m., zvision wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3346/
> -----------------------------------------------------------
> 
> (Updated March 17, 2014, 4:23 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-23351
>     https://issues.asterisk.org/jira/browse/ASTERISK-23351
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This patch fixes handling of nullable int columns in update_realtime function. It checks if a value is empty and sets the column to NULL instead of '', which raises an error.
> Additionally, it checks for existence of the keyfield column instead of the first parameter column.
> 
> 
> Diffs
> -----
> 
>   http://svn.asterisk.org/svn/asterisk/branches/1.8/res/res_config_pgsql.c 410663 
> 
> Diff: https://reviewboard.asterisk.org/r/3346/diff/
> 
> 
> Testing
> -------
> 
> Only tested for successful compilation. Someone needs to confirm that the patch works fine.
> 
> 
> File Attachments
> ----------------
> 
> Patch version for branch 12
>   https://reviewboard.asterisk.org/media/uploaded/files/2014/03/17/743ba069-05bf-4b31-9bc9-08af861a6d84__res_config_pgsql.12.diff
> 
> 
> Thanks,
> 
> zvision
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140323/8d7d6cd9/attachment.html>


More information about the asterisk-dev mailing list