[asterisk-addons-commits] tilghman: branch 1.6.0 r931 - /branches/1.6.0/res/res_config_mysql.c
SVN commits to the Asterisk addons project
asterisk-addons-commits at lists.digium.com
Wed May 27 13:15:47 CDT 2009
Author: tilghman
Date: Wed May 27 13:15:42 2009
New Revision: 931
URL: http://svn.asterisk.org/svn-view/asterisk-addons?view=rev&rev=931
Log:
Only calculated time connected, if it actually was connected.
(closes issue #15094)
Reported by: IgorG
Patches:
res_mysql.cli_connected_time_fix.v1.diff uploaded by IgorG (license 20)
Modified:
branches/1.6.0/res/res_config_mysql.c
Modified: branches/1.6.0/res/res_config_mysql.c
URL: http://svn.asterisk.org/svn-view/asterisk-addons/branches/1.6.0/res/res_config_mysql.c?view=diff&rev=931&r1=930&r2=931
==============================================================================
--- branches/1.6.0/res/res_config_mysql.c (original)
+++ branches/1.6.0/res/res_config_mysql.c Wed May 27 13:15:42 2009
@@ -912,7 +912,7 @@
if (a->argc != 3)
return CLI_SHOWUSAGE;
- ctime = time(NULL) - dbread.connect_time;
+ ctime = dbread.connect_time ? time(NULL) - dbread.connect_time : 0;
if (mysql_reconnect(&dbread)) {
if (!ast_strlen_zero(dbread.host))
More information about the asterisk-addons-commits
mailing list