aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_config_odbc.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-07 21:00:10 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-07 21:00:10 +0000
commita1906a3e9591f343c0718f81ae53379eed5ca5a0 (patch)
treee52f95db2669524944a063e3149d784d27f29299 /res/res_config_odbc.c
parent6959a3e059dd70de1a35ef65682429a93e0475f8 (diff)
Merged revisions 78488 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r78488 | russell | 2007-08-07 15:57:54 -0500 (Tue, 07 Aug 2007) | 2 lines Fix the build of this module on 64-bit platforms ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78489 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_config_odbc.c')
-rw-r--r--res/res_config_odbc.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/res/res_config_odbc.c b/res/res_config_odbc.c
index ce3f672eb..5a9ad5cd0 100644
--- a/res/res_config_odbc.c
+++ b/res/res_config_odbc.c
@@ -57,7 +57,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
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 @@ static SQLHSTMT custom_prepare(struct odbc_obj *obj, void *data)
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)) {
@@ -127,8 +128,9 @@ static struct ast_variable *realtime_odbc(const char *database, const char *tabl
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)
@@ -269,9 +271,10 @@ static struct ast_config *realtime_multi_odbc(const char *database, const char *
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)
@@ -399,8 +402,9 @@ static int update_odbc(const char *database, const char *table, const char *keyf
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)