You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by rp...@apache.org on 2009/11/26 22:03:42 UTC
svn commit: r884697 - /apr/apr/trunk/dbd/apr_dbd_mysql.c
Author: rpluem
Date: Thu Nov 26 21:03:41 2009
New Revision: 884697
URL: http://svn.apache.org/viewvc?rev=884697&view=rev
Log:
* mysql_options() requires a pointer as third argument, not a value.
PR: 48251
Submitted by: Marko Kevac <mkevac gmail.com>
Reviewed by: rpluem
Modified:
apr/apr/trunk/dbd/apr_dbd_mysql.c
Modified: apr/apr/trunk/dbd/apr_dbd_mysql.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/dbd/apr_dbd_mysql.c?rev=884697&r1=884696&r2=884697&view=diff
==============================================================================
--- apr/apr/trunk/dbd/apr_dbd_mysql.c (original)
+++ apr/apr/trunk/dbd/apr_dbd_mysql.c Thu Nov 26 21:03:41 2009
@@ -1131,6 +1131,7 @@
{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 @@
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