[asterisk-dev] [Code Review]: Update to review 1160
Tilghman Lesher
reviewboard at asterisk.org
Wed Mar 7 15:14:07 CST 2012
> On March 7, 2012, 1:18 p.m., Tilghman Lesher wrote:
> > /trunk/cel/cel_odbc.c, lines 488-493
> > <https://reviewboard.asterisk.org/r/1804/diff/1/?file=25875#file25875line488>
> >
> > Not so fast. This breaks the specification of "static" values in the configuration file. In this case, celname is going to be blank.
>
> Terry Wilson wrote:
> There is a check for staticvalue before we ever get here. There is no way for unknown to be set if staticvalue is set.
You should still be emitting a warning here, rather than silently ignoring the specified CEL field, perhaps something along the lines of:
} else {
static int count = 0;
if (!ast_strlen_zero(entry->celname) && count++ % 100 == 0) {
ast_log(LOG_WARNING, "Unknown CEL field '%s'. Perhaps you misspelled it?\n", entry->celname);
}
colbuf[0] = 0;
unknown = 1;
}
- Tilghman
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1804/#review5755
-----------------------------------------------------------
On March 7, 2012, 2:47 p.m., Terry Wilson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1804/
> -----------------------------------------------------------
>
> (Updated March 7, 2012, 2:47 p.m.)
>
>
> Review request for Asterisk Developers and Tilghman Lesher.
>
>
> Summary
> -------
>
> This basically just addresses tilghman's last comment on review 1160 since that review stalled. It also adds a check for columns that that we don't know about, so that if we are doing an INSERT, we don't complain about empty values for columns like auto-incremented ids, etc.
>
> The checks for wide characters should probably be backported to 1.8+ since recent mysql odbc connectors throw a bunch of warnings becauase the varchar types end up being used.
>
>
> This addresses bug ASTERISK-17548.
> https://issues.asterisk.org/jira/browse/ASTERISK-17548
>
>
> Diffs
> -----
>
> /trunk/cel/cel_odbc.c 358575
> /trunk/configs/cel_odbc.conf.sample 358575
>
> Diff: https://reviewboard.asterisk.org/r/1804/diff
>
>
> Testing
> -------
>
> Installed odbc stuff and mysql/postgres and set up CEL. I didn't see any problems.
>
>
> Thanks,
>
> Terry
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120307/dbc1bf45/attachment-0001.htm>
More information about the asterisk-dev
mailing list