[asterisk-addons-commits] file: trunk r464 - /trunk/app_addon_sql_mysql.c

SVN commits to the Asterisk addons project asterisk-addons-commits at lists.digium.com
Wed Oct 10 08:51:28 CDT 2007


Author: file
Date: Wed Oct 10 08:51:28 2007
New Revision: 464

URL: http://svn.digium.com/view/asterisk-addons?view=rev&rev=464
Log:
Give the reason why mysql_real_connect failed to connect as part of the console log message.
(closes issue #10932)
Reported by: eserra
Patches:
      mysql_real_connect_error.patch uploaded by eserra (license 45)

Modified:
    trunk/app_addon_sql_mysql.c

Modified: trunk/app_addon_sql_mysql.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/app_addon_sql_mysql.c?view=diff&rev=464&r1=463&r2=464
==============================================================================
--- trunk/app_addon_sql_mysql.c (original)
+++ trunk/app_addon_sql_mysql.c Wed Oct 10 08:51:28 2007
@@ -235,7 +235,7 @@
 				return 0;
 			}
 			else {
-				ast_log(LOG_WARNING,"mysql_real_connect(mysql,%s,%s,dbpass,%s,...) failed\n",dbhost,dbuser,dbname);
+				ast_log(LOG_WARNING,"mysql_real_connect(mysql,%s,%s,dbpass,%s,...) failed(%d): %s\n",dbhost,dbuser,dbname,mysql_errno(mysql), mysql_error(mysql));
 			}
 		}
 		else {




More information about the asterisk-addons-commits mailing list