diff options
author | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-01 18:04:00 +0000 |
---|---|---|
committer | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-01 18:04:00 +0000 |
commit | dbfc54609a2789f5e758b63fef140842db79bfdf (patch) | |
tree | 4600e0b118974096978024d8e28c66221bd873e9 /res | |
parent | c26cd784c85164c725f70caa10ac7df298fbafde (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@11527 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-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 adc1bc4ee..e10f4ff7f 100644 --- a/res/res_config_odbc.c +++ b/res/res_config_odbc.c @@ -103,7 +103,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); @@ -146,7 +146,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); @@ -249,7 +249,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); @@ -300,7 +300,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); @@ -376,7 +376,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); |