[asterisk-addons-commits] file: branch 1.2 r404 - /branches/1.2/cdr_addon_mysql.c

SVN commits to the Asterisk addons project asterisk-addons-commits at lists.digium.com
Thu Jun 21 10:08:23 CDT 2007


Author: file
Date: Thu Jun 21 10:08:22 2007
New Revision: 404

URL: http://svn.digium.com/view/asterisk-addons?view=rev&rev=404
Log:
Use mysql_errno to get the error instead of mysql_ping's return value. (issue #9434 reported by lupino3)

Modified:
    branches/1.2/cdr_addon_mysql.c

Modified: branches/1.2/cdr_addon_mysql.c
URL: http://svn.digium.com/view/asterisk-addons/branches/1.2/cdr_addon_mysql.c?view=diff&rev=404&r1=403&r2=404
==============================================================================
--- branches/1.2/cdr_addon_mysql.c (original)
+++ branches/1.2/cdr_addon_mysql.c Thu Jun 21 10:08:22 2007
@@ -150,7 +150,7 @@
 		if ((error = mysql_ping(&mysql))) {
 			connected = 0;
 			records = 0;
-			switch (error) {
+			switch (mysql_errno(&mysql)) {
 				case CR_SERVER_GONE_ERROR:
 				case CR_SERVER_LOST:
 					ast_log(LOG_ERROR, "cdr_mysql: Server has gone away. Attempting to reconnect.\n");




More information about the asterisk-addons-commits mailing list