[asterisk-commits] russell: branch 1.4 r78488 - /branches/1.4/res/res_config_odbc.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 7 15:57:55 CDT 2007


Author: russell
Date: Tue Aug  7 15:57:54 2007
New Revision: 78488

URL: http://svn.digium.com/view/asterisk?view=rev&rev=78488
Log:
Fix the build of this module on 64-bit platforms

Modified:
    branches/1.4/res/res_config_odbc.c

Modified: branches/1.4/res/res_config_odbc.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/res/res_config_odbc.c?view=diff&rev=78488&r1=78487&r2=78488
==============================================================================
--- branches/1.4/res/res_config_odbc.c (original)
+++ branches/1.4/res/res_config_odbc.c Tue Aug  7 15:57:54 2007
@@ -57,7 +57,7 @@
 struct custom_prepare_struct {
 	const char *sql;
 	const char *extra;
-	va_list *ap;
+	va_list ap;
 };
 
 static SQLHSTMT custom_prepare(struct odbc_obj *obj, void *data)
@@ -67,7 +67,8 @@
 	const char *newparam, *newval;
 	SQLHSTMT stmt;
 	va_list ap;
-	va_copy(ap, *(cps->ap));
+
+	va_copy(ap, cps->ap);
 
 	res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &stmt);
 	if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
@@ -115,8 +116,9 @@
 	SQLSMALLINT nullable;
 	SQLLEN indicator;
 	va_list aq;
-	struct custom_prepare_struct cps = { .sql = sql, .ap = &ap };
-	
+	struct custom_prepare_struct cps = { .sql = sql };
+
+	va_copy(cps.ap, ap);
 	va_copy(aq, ap);
 
 	if (!table)
@@ -240,9 +242,10 @@
 	SQLSMALLINT decimaldigits;
 	SQLSMALLINT nullable;
 	SQLLEN indicator;
-	struct custom_prepare_struct cps = { .sql = sql, .ap = &ap };
-
+	struct custom_prepare_struct cps = { .sql = sql };
 	va_list aq;
+
+	va_copy(cps.ap, ap);
 	va_copy(aq, ap);
 
 	if (!table)
@@ -357,8 +360,9 @@
 	const char *newparam, *newval;
 	int res;
 	va_list aq;
-	struct custom_prepare_struct cps = { .sql = sql, .ap = &ap, .extra = lookup };
-	
+	struct custom_prepare_struct cps = { .sql = sql, .extra = lookup };
+
+	va_copy(cps.ap, ap);
 	va_copy(aq, ap);
 	
 	if (!table)




More information about the asterisk-commits mailing list