From: Russell Bryant Date: Sat, 8 Jan 2005 21:15:07 +0000 (+0000) Subject: fix disposition to be a string instead of an int (bug #3255) X-Git-Tag: 1.0.11.1~289 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8526ef3ba01aedd78ffaee8ec1a568afcb2b7bd;p=thirdparty%2Fasterisk.git fix disposition to be a string instead of an int (bug #3255) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4716 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/CHANGES b/CHANGES index e851eec760..fc05ca43b7 100755 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ + -- cdr_odbc + -- fix disposition to be stored as a string instead of an integer + -- NOTE: If you were already using cdr_odbc from a previous release, + you will need to make the necessary change to your db so that + it expects a string instead of an integer. Asterisk 1.0.3 -- chan_zap -- fix seg fault when doing *0 to flash a trunk diff --git a/cdr/cdr_odbc.c b/cdr/cdr_odbc.c index c28a329c9f..ee9bcf893c 100755 --- a/cdr/cdr_odbc.c +++ b/cdr/cdr_odbc.c @@ -126,7 +126,7 @@ static int odbc_log(struct ast_cdr *cdr) SQLBindParameter(ODBC_stmt, 9, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, sizeof(cdr->lastdata), 0, cdr->lastdata, 0, NULL); SQLBindParameter(ODBC_stmt, 10, SQL_PARAM_INPUT, SQL_C_SLONG, SQL_INTEGER, 0, 0, &cdr->duration, 0, NULL); SQLBindParameter(ODBC_stmt, 11, SQL_PARAM_INPUT, SQL_C_SLONG, SQL_INTEGER, 0, 0, &cdr->billsec, 0, NULL); - SQLBindParameter(ODBC_stmt, 12, SQL_PARAM_INPUT, SQL_C_SLONG, SQL_INTEGER, 0, 0, &cdr->disposition, 0, NULL); + SQLBindParameter(ODBC_stmt, 12, SQL_PARAM_INPUT, SQL_C_SLONG, SQL_CHAR, strlen(ast_cdr_disp2str(cdr->disposition)) + 1, 0, ast_cdr_disp2str(cdr->disposition), 0, NULL); SQLBindParameter(ODBC_stmt, 13, SQL_PARAM_INPUT, SQL_C_SLONG, SQL_INTEGER, 0, 0, &cdr->amaflags, 0, NULL); SQLBindParameter(ODBC_stmt, 14, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, sizeof(cdr->accountcode), 0, cdr->accountcode, 0, NULL);