mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	Bug 6615 - Fix 64bit conversion errors by using a long int
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -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); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user