]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix disposition to be a string instead of an int (bug #3255)
authorRussell Bryant <russell@russellbryant.com>
Sat, 8 Jan 2005 21:15:07 +0000 (21:15 +0000)
committerRussell Bryant <russell@russellbryant.com>
Sat, 8 Jan 2005 21:15:07 +0000 (21:15 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4716 65c4cc65-6c06-0410-ace0-fbb531ad65f3

CHANGES
cdr/cdr_odbc.c

diff --git a/CHANGES b/CHANGES
index e851eec76026da4abe4e51b7d0ceaeafa3738741..fc05ca43b74e463497a66a93847641985e15688e 100755 (executable)
--- 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
index c28a329c9f82ea82e75f5f981c25fc95fab09d30..ee9bcf893c5c586249d03bae38278cb81cd49a45 100755 (executable)
@@ -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);