[Asterisk-cvs] asterisk/channels chan_iax.c,1.37,1.38 chan_iax2.c,1.70,1.71
markster at lists.digium.com
markster at lists.digium.com
Thu Nov 13 09:59:38 CST 2003
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv31758/channels
Modified Files:
chan_iax.c chan_iax2.c
Log Message:
Don't reconnect db on reload unless there was a failure
Index: chan_iax.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- chan_iax.c 13 Nov 2003 05:21:15 -0000 1.37
+++ chan_iax.c 13 Nov 2003 16:25:52 -0000 1.38
@@ -4932,7 +4932,7 @@
ast_destroy(cfg);
#ifdef MYSQL_FRIENDS
/* Connect to db if appropriate */
- if (strlen(mydbname)) {
+ if (!mysql && strlen(mydbname)) {
mysql = mysql_init(NULL);
if (!mysql_real_connect(mysql, mydbhost[0] ? mydbhost : NULL, mydbuser, mydbpass, mydbname, 0, NULL, 0)) {
memset(mydbpass, '*', strlen(mydbpass));
Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- chan_iax2.c 13 Nov 2003 05:21:15 -0000 1.70
+++ chan_iax2.c 13 Nov 2003 16:25:52 -0000 1.71
@@ -5516,7 +5516,7 @@
set_timing();
#ifdef MYSQL_FRIENDS
/* Connect to db if appropriate */
- if (strlen(mydbname)) {
+ if (!mysql && strlen(mydbname)) {
mysql = mysql_init(NULL);
if (!mysql_real_connect(mysql, mydbhost[0] ? mydbhost : NULL, mydbuser, mydbpass, mydbname, 0, NULL, 0)) {
memset(mydbpass, '*', strlen(mydbpass));
More information about the svn-commits
mailing list