diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-01 17:53:05 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-01 17:53:05 +0000 |
commit | d723568b932abb813d34582169a03b6e45dc800a (patch) | |
tree | 2dc6a87525a331884eee2da626eb354305bbce13 /res/res_config_odbc.c | |
parent | 568b8826d4fe7161302094db9e44ce345a266655 (diff) |
Merged revisions 11503 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r11503 | tilghman | 2006-03-01 11:41:52 -0600 (Wed, 01 Mar 2006) | 2 lines
Bug 6615 - Fix 64bit conversion errors by using a long int
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@11504 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_config_odbc.c')
-rw-r--r-- | res/res_config_odbc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/res/res_config_odbc.c b/res/res_config_odbc.c index 29390af68..933cba28a 100644 --- a/res/res_config_odbc.c +++ b/res/res_config_odbc.c @@ -105,7 +105,7 @@ static struct ast_variable *realtime_odbc(const char *database, const char *tabl newval = va_arg(aq, const char *); } va_end(aq); - res = SQLPrepare(stmt, sql, SQL_NTS); + res = SQLPrepare(stmt, (unsigned char *)sql, SQL_NTS); if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) { ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql); SQLFreeHandle (SQL_HANDLE_STMT, stmt); @@ -148,7 +148,7 @@ static struct ast_variable *realtime_odbc(const char *database, const char *tabl for (x=0;x<colcount;x++) { rowdata[0] = '\0'; collen = sizeof(coltitle); - res = SQLDescribeCol(stmt, x + 1, coltitle, sizeof(coltitle), &collen, + res = SQLDescribeCol(stmt, x + 1, (unsigned char *)coltitle, sizeof(coltitle), &collen, &datatype, &colsize, &decimaldigits, &nullable); if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) { ast_log(LOG_WARNING, "SQL Describe Column error!\n[%s]\n\n", sql); @@ -251,7 +251,7 @@ static struct ast_config *realtime_multi_odbc(const char *database, const char * if (initfield) snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " ORDER BY %s", initfield); va_end(aq); - res = SQLPrepare(stmt, sql, SQL_NTS); + res = SQLPrepare(stmt, (unsigned char *)sql, SQL_NTS); if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) { ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql); SQLFreeHandle (SQL_HANDLE_STMT, stmt); @@ -302,7 +302,7 @@ static struct ast_config *realtime_multi_odbc(const char *database, const char * for (x=0;x<colcount;x++) { rowdata[0] = '\0'; collen = sizeof(coltitle); - res = SQLDescribeCol(stmt, x + 1, coltitle, sizeof(coltitle), &collen, + res = SQLDescribeCol(stmt, x + 1, (unsigned char *)coltitle, sizeof(coltitle), &collen, &datatype, &colsize, &decimaldigits, &nullable); if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) { ast_log(LOG_WARNING, "SQL Describe Column error!\n[%s]\n\n", sql); @@ -378,7 +378,7 @@ static int update_odbc(const char *database, const char *table, const char *keyf va_end(aq); snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " WHERE %s=?", keyfield); - res = SQLPrepare(stmt, sql, SQL_NTS); + res = SQLPrepare(stmt, (unsigned char *)sql, SQL_NTS); if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) { ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql); SQLFreeHandle (SQL_HANDLE_STMT, stmt); |