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

Friendly Automation (JIRA) noreply at issues.asterisk.org
Wed May 10 06:35:58 CDT 2017


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

Friendly Automation commented on ASTERISK-25032:
------------------------------------------------

Change 5589 merged by Jenkins2:
cel_odbc:  Fix timestamp processing for microseconds

[https://gerrit.asterisk.org/5589|https://gerrit.asterisk.org/5589]

> [patch]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