[asterisk-addons-commits] tilghman: trunk r507 - /trunk/app_addon_sql_mysql.c

SVN commits to the Asterisk addons project asterisk-addons-commits at lists.digium.com
Tue Jan 22 11:10:25 CST 2008


Author: tilghman
Date: Mon Jan 21 07:37:48 2008
New Revision: 507

URL: http://svn.digium.com/view/asterisk-addons?view=rev&rev=507
Log:
Only use CLIENT_MULTI_STATEMENTS if the constant is defined (backwards compatibility fix)

Modified:
    trunk/app_addon_sql_mysql.c

Change Statistics:
 0 files changed

Modified: trunk/app_addon_sql_mysql.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/app_addon_sql_mysql.c?view=diff&rev=507&r1=506&r2=507
==============================================================================
--- trunk/app_addon_sql_mysql.c (original)
+++ trunk/app_addon_sql_mysql.c Mon Jan 21 07:37:48 2008
@@ -263,7 +263,14 @@
 	}
 
 	if (! mysql_real_connect(mysql, args.dbhost, args.dbuser, args.dbpass, args.dbname, 0, NULL,
-			CLIENT_MULTI_STATEMENTS | CLIENT_MULTI_RESULTS)) {
+#ifdef CLIENT_MULTI_STATEMENTS
+			CLIENT_MULTI_STATEMENTS | CLIENT_MULTI_RESULTS
+#elif defined(CLIENT_MULTI_QUERIES)
+			CLIENT_MULTI_QUERIES
+#else
+			0
+#endif
+		)) {
 		ast_log(LOG_WARNING, "mysql_real_connect(mysql,%s,%s,dbpass,%s,...) failed(%d): %s\n",
 				args.dbhost, args.dbuser, args.dbname, mysql_errno(mysql), mysql_error(mysql));
 		return -1;




More information about the asterisk-addons-commits mailing list