[svn-commits] branch 1.2 - r179 /branches/1.2/cdr_addon_mysql.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Dec 1 18:34:42 CST 2005


Author: kpfleming
Date: Thu Dec  1 18:34:41 2005
New Revision: 179

URL: http://svn.digium.com/view/asterisk-addons?rev=179&view=rev
Log:
if we're going to forget that the connection is open, we should close it too (issue #5895)

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?rev=179&r1=178&r2=179&view=diff
==============================================================================
--- branches/1.2/cdr_addon_mysql.c (original)
+++ branches/1.2/cdr_addon_mysql.c Thu Dec  1 18:34:41 2005
@@ -224,6 +224,7 @@
 	if (connected) {
 		if (mysql_real_query(&mysql, sqlcmd, strlen(sqlcmd))) {
 			ast_log(LOG_ERROR, "mysql_cdr: Failed to insert into database: (%d) %s", mysql_errno(&mysql), mysql_error(&mysql));
+			mysql_close(&mysql);
 			connected = 0;
 		} else {
 			records++;



More information about the svn-commits mailing list