Просмотр исходного кода

crash fixed on wrong DB connection string

mom040267 11 лет назад
Родитель
Сommit
f904f07969

+ 4 - 2
ChangeLog

@@ -1,7 +1,9 @@
-08/03/2014 Oleg Moskalenko <[email protected]>
-Version 4.1.1.2 'Vitari':
+08/14/2014 Oleg Moskalenko <[email protected]>
+Version 4.1.2.1 'Vitari':
 	- The origin attribute is verified in the subsequent 
 	session messages.
+	- Crash fixed when the DB connection string is incorrect.
+	- Minor docs fixes.
 	
 07/29/2014 Oleg Moskalenko <[email protected]>
 Version 4.1.1.1 'Vitari':

+ 1 - 2
INSTALL

@@ -232,8 +232,7 @@ The following platforms have been used in the development:
 	- FreeBSD 8.x, i386
 	- PC-BSD 9.x, x86_64
 	- Solaris 11, x86_64
-	- Linux CentOS / Red Hat Enterprise Edition 6.3, x86_64 (amd64)
-	- Linux CentOS / Red Hat Enterprise Edition 6.4, x86_32 (i386)
+	- Linux CentOS / Red Hat Enterprise Edition 6.x-7.0, x86_64 (i386 & amd64)
 	- Linux Debian 'Squeeze', i386
 	- Linux Mint 14.1 'Nadia', i386
 	- Linux Mint 16 'Petra', i386

+ 1 - 1
rpm/build.settings.sh

@@ -2,7 +2,7 @@
 
 # Common settings script.
 
-TURNVERSION=4.1.1.2
+TURNVERSION=4.1.2.1
 BUILDDIR=~/rpmbuild
 ARCH=`uname -p`
 TURNSERVER_SVN_URL=http://coturn.googlecode.com/svn

+ 3 - 3
rpm/turnserver.spec

@@ -1,5 +1,5 @@
 Name:		turnserver
-Version:	4.1.1.2
+Version:	4.1.2.1
 Release:	0%{dist}
 Summary:	Coturn TURN Server
 
@@ -293,8 +293,8 @@ fi
 %{_includedir}/turn/client/TurnMsgLib.h
 
 %changelog
-* Sun Aug 03 2014 Oleg Moskalenko <[email protected]>
-  - Sync to 4.1.1.2
+* Thu Aug 14 2014 Oleg Moskalenko <[email protected]>
+  - Sync to 4.1.2.1
 * Tue Jul 29 2014 Oleg Moskalenko <[email protected]>
   - Sync to 4.1.1.1
 * Tue Jul 22 2014 Oleg Moskalenko <[email protected]>

+ 10 - 8
src/apps/relay/dbdrivers/dbd_mysql.c

@@ -142,14 +142,16 @@ static Myconninfo *MyconninfoParse(char *userdb, char **errmsg) {
 		turn_free(s0, strlen(s0)+1);
 	}
 
-	if(!(co->dbname))
-		co->dbname=strdup("0");
-	if(!(co->host))
-		co->host=strdup("127.0.0.1");
-	if(!(co->user))
-		co->user=strdup("");
-	if(!(co->password))
-		co->password=strdup("");
+	if(co) {
+		if(!(co->dbname))
+			co->dbname=strdup("0");
+		if(!(co->host))
+			co->host=strdup("127.0.0.1");
+		if(!(co->user))
+			co->user=strdup("");
+		if(!(co->password))
+			co->password=strdup("");
+	}
 
 	return co;
 }

+ 8 - 6
src/apps/relay/dbdrivers/dbd_redis.c

@@ -148,12 +148,14 @@ static Ryconninfo *RyconninfoParse(const char *userdb, char **errmsg) {
 		turn_free(s0, strlen(s0)+1);
 	}
 
-	if(!(co->dbname))
-		co->dbname=strdup("0");
-	if(!(co->host))
-		co->host=strdup("127.0.0.1");
-	if(!(co->password))
-		co->password=strdup("");
+	if(co) {
+		if(!(co->dbname))
+			co->dbname=strdup("0");
+		if(!(co->host))
+			co->host=strdup("127.0.0.1");
+		if(!(co->password))
+			co->password=strdup("");
+	}
 
 	return co;
 }

+ 1 - 1
src/ns_turn_defs.h

@@ -31,7 +31,7 @@
 #ifndef __IOADEFS__
 #define __IOADEFS__
 
-#define TURN_SERVER_VERSION "4.1.1.2"
+#define TURN_SERVER_VERSION "4.1.2.1"
 #define TURN_SERVER_VERSION_NAME "Vitari"
 #define TURN_SOFTWARE "Coturn-" TURN_SERVER_VERSION " '" TURN_SERVER_VERSION_NAME "'"