Merged revisions 329614 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Wed, 27 Jul 2011 04:27:19 +0000 (04:27 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Wed, 27 Jul 2011 04:27:19 +0000 (04:27 +0000)
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r329614 | tilghman | 2011-07-26 23:25:26 -0500 (Tue, 26 Jul 2011) | 13 lines

  Merged revisions 329613 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.8

  ........
    r329613 | tilghman | 2011-07-26 23:23:46 -0500 (Tue, 26 Jul 2011) | 6 lines

    Duration and billsec are swapped in high resolution time.

    Closes ASTERISK-18024
    Patches:
     20110726__ASTERISK-18024.diff by Tilghman Lesher (License 5003)
  ........
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329615 65c4cc65-6c06-0410-ace0-fbb531ad65f3

cdr/cdr_odbc.c

index 45f8bca..e940b93 100644 (file)
@@ -108,8 +108,8 @@ static SQLHSTMT execute_cb(struct odbc_obj *obj, void *data)
                }
                hrduration = (double) ast_tvdiff_us(cdr->end, cdr->start) / 1000000.0;
 
-               SQLBindParameter(stmt, 9, SQL_PARAM_INPUT, SQL_C_DOUBLE, SQL_FLOAT, 0, 0, &hrbillsec, 0, NULL);
-               SQLBindParameter(stmt, 10, SQL_PARAM_INPUT, SQL_C_DOUBLE, SQL_FLOAT, 0, 0, &hrduration, 0, NULL);
+               SQLBindParameter(stmt, 9, SQL_PARAM_INPUT, SQL_C_DOUBLE, SQL_FLOAT, 0, 0, &hrduration, 0, NULL);
+               SQLBindParameter(stmt, 10, SQL_PARAM_INPUT, SQL_C_DOUBLE, SQL_FLOAT, 0, 0, &hrbillsec, 0, NULL);
        } else {
                SQLBindParameter(stmt, 9, SQL_PARAM_INPUT, SQL_C_SLONG, SQL_INTEGER, 0, 0, &cdr->duration, 0, NULL);
                SQLBindParameter(stmt, 10, SQL_PARAM_INPUT, SQL_C_SLONG, SQL_INTEGER, 0, 0, &cdr->billsec, 0, NULL);