[asterisk-dev] [Code Review] High Resolution Call Time for Billsec and Duration

Kevin Fleming kpfleming at digium.com
Sat Jan 23 08:47:22 CST 2010



> On 2010-01-22 18:00:26, Tilghman Lesher wrote:
> > /trunk/cdr/cdr_adaptive_odbc.c, line 620
> > <https://reviewboard.asterisk.org/r/461/diff/5/?file=7785#file7785line620>
> >
> >     When you're doing something like this, it's much more efficient simply to ast_copy_string(colbuf, "0", sizeof(colbuf)).

If efficiency is your goal, strcpy(colbuf, "0"); or memcpy(colbuf, "0", 2); would be even more efficient. ast_copy_string() is certainly much better than using snprintf() though, since there isn't any actual formatting to be done.


- Kevin


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


On 2010-01-21 05:00:41, Brad Latus wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/461/
> -----------------------------------------------------------
> 
> (Updated 2010-01-21 05:00:41)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This allows for the showing of the accurate times for billable time and call duration.
> Adds new flag to CDR function 'f' for the above fields.
> 
> This came about by bug #16559 and I thought i'd take a go at making it happen.
> 
> We can drop a few of the modules for ones we want to depreciate like sql-lite / odbc (in favour of sql-lite3 / adaptive_odbc)
> 
> 
> This addresses bug 16559.
>     https://issues.asterisk.org/view.php?id=16559
> 
> 
> Diffs
> -----
> 
>   /trunk/CHANGES 240716 
>   /trunk/UPGRADE.txt 240716 
>   /trunk/addons/cdr_mysql.c 240716 
>   /trunk/cdr/cdr_adaptive_odbc.c 240716 
>   /trunk/cdr/cdr_odbc.c 240716 
>   /trunk/cdr/cdr_sqlite.c 240716 
>   /trunk/cdr/cdr_tds.c 240716 
>   /trunk/configs/cdr_custom.conf.sample 240716 
>   /trunk/configs/cdr_odbc.conf.sample 240716 
>   /trunk/configs/cdr_sqlite3_custom.conf.sample 240716 
>   /trunk/configs/cdr_syslog.conf.sample 240716 
>   /trunk/configs/cdr_tds.conf.sample 240716 
>   /trunk/funcs/func_cdr.c 240716 
> 
> Diff: https://reviewboard.asterisk.org/r/461/diff
> 
> 
> Testing
> -------
> 
> Compile test only.
> 
> 
> Thanks,
> 
> Brad
> 
>




More information about the asterisk-dev mailing list