summaryrefslogtreecommitdiff
path: root/dbd
diff options
context:
space:
mode:
authorRuediger Pluem <rpluem@apache.org>2009-11-26 21:03:41 +0000
committerRuediger Pluem <rpluem@apache.org>2009-11-26 21:03:41 +0000
commit5d1c82eae26a2fdb4c6b6596f306c63e3dcef2ce (patch)
treeb53790e83c9758d9dbaadd42f7d23f3b4ac45306 /dbd
parent81614fe91038bd2e41cc10e835eb3d426b70a596 (diff)
downloadapr-5d1c82eae26a2fdb4c6b6596f306c63e3dcef2ce.tar.gz
* mysql_options() requires a pointer as third argument, not a value.
PR: 48251 Submitted by: Marko Kevac <mkevac gmail.com> Reviewed by: rpluem git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@884697 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dbd')
-rw-r--r--dbd/apr_dbd_mysql.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/dbd/apr_dbd_mysql.c b/dbd/apr_dbd_mysql.c
index a54204cf9..4b2790aac 100644
--- a/dbd/apr_dbd_mysql.c
+++ b/dbd/apr_dbd_mysql.c
@@ -1131,6 +1131,7 @@ static apr_dbd_t *dbd_mysql_open(apr_pool_t *pool, const char *params,
{NULL, NULL}
};
unsigned int port = 0;
+ unsigned int timeout = 0;
apr_dbd_t *sql = apr_pcalloc(pool, sizeof(apr_dbd_t));
sql->fldsz = FIELDSIZE;
sql->conn = mysql_init(sql->conn);
@@ -1184,16 +1185,19 @@ static apr_dbd_t *dbd_mysql_open(apr_pool_t *pool, const char *params,
do_reconnect = atoi(fields[9].value) ? 1 : 0;
}
if (fields[10].value != NULL) {
- mysql_options(sql->conn, MYSQL_OPT_CONNECT_TIMEOUT,
- atoi(fields[10].value));
+ timeout = atoi(fields[10].value);
+ mysql_options(sql->conn, MYSQL_OPT_CONNECT_TIMEOUT,
+ (const void *)&timeout);
}
if (fields[11].value != NULL) {
- mysql_options(sql->conn, MYSQL_OPT_READ_TIMEOUT,
- atoi(fields[11].value));
+ timeout = atoi(fields[11].value);
+ mysql_options(sql->conn, MYSQL_OPT_READ_TIMEOUT,
+ (const void *)&timeout);
}
if (fields[12].value != NULL) {
- mysql_options(sql->conn, MYSQL_OPT_WRITE_TIMEOUT,
- atoi(fields[12].value));
+ timeout = atoi(fields[12].value);
+ mysql_options(sql->conn, MYSQL_OPT_WRITE_TIMEOUT,
+ (const void *)&timeout);
}
#endif