From: Tilghman Lesher Date: Wed, 27 Jul 2011 04:23:46 +0000 (+0000) Subject: Duration and billsec are swapped in high resolution time. X-Git-Tag: 1.8.6.0-rc1~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=441e8b74268c6ad20696d597f6aa35f6fffda983;p=thirdparty%2Fasterisk.git 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/branches/1.8@329613 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/cdr/cdr_odbc.c b/cdr/cdr_odbc.c index 45f8bca795..e940b9353b 100644 --- a/cdr/cdr_odbc.c +++ b/cdr/cdr_odbc.c @@ -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);