[asterisk-bugs] [JIRA] (ASTERISK-25032) cel_odbc sometimes inserts CEL with wrong eventtime

Rusty Newton (JIRA) noreply at issues.asterisk.org
Thu Apr 30 19:13:33 CDT 2015


    [ https://issues.asterisk.org/jira/browse/ASTERISK-25032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=226081#comment-226081 ] 

Rusty Newton commented on ASTERISK-25032:
-----------------------------------------

Thanks for the contribution! If you'd like your contribution to be included faster, you should submit your patch for code review by the Asterisk Developer Community. To do so, please follow the Code Review [1] instructions on the wiki. Be sure to:
* Verify that your patch conforms to the Coding Guidelines [2]
* Review the Code Review Checklist [3] for common items reviewers will look for
* If necessary, provide tests for the Asterisk Test Suite that verify the correctness of your patch [4]

When ready, submit your patch and any tests to Review Board [5] for code review.

Thanks!

[1] https://wiki.asterisk.org/wiki/display/AST/Code+Review
[2] https://wiki.asterisk.org/wiki/display/AST/Coding+Guidelines
[3] https://wiki.asterisk.org/wiki/display/AST/Code+Review+Checklist
[4] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Test+Suite+Documentation
[5] https://wiki.asterisk.org/wiki/display/AST/Review+Board+Usage



> cel_odbc sometimes inserts CEL with wrong eventtime
> ---------------------------------------------------
>
>                 Key: ASTERISK-25032
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25032
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: CEL/cel_odbc
>    Affects Versions: 11.17.1, 13.3.2
>            Reporter: Etienne Lessard
>            Severity: Minor
>         Attachments: AST-25032.patch
>
>
> Given I have a postgresql server with a "cel" table with a column "eventtime" of type timestamp
> Given I have cel_odbc configured to insert CEL in the "cel" table of my postgresql server
> When a CEL (struct ast_cel_event_record) is generated with eventtime.tv_usec between 1 and 99999, inclusively
> Then the record inserted in postgresql has the wrong eventtime
> For example, a CEL created at 1430309985.000009 will be inserted in postgresql with an eventtime of 1430309985.9.
> I took postgresql as an example, but the bug will show up for any DBMS with timestamp with sub-second precision.
> The bug does not show up if the column "eventtime" is of type varchar instead of timestamp.
> I wrote a small module to do some manual test: https://github.com/elessard1/asterisk-lab/blob/cel-odbc-wrong-eventtime/lab.c
> After compiling and loading the module, you can call "lab cel <us>" from the CLI, and it will generate a dummy CEL event with the given microsecond part.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list