diff --git a/ChangeLog b/ChangeLog index 5509140e..333d1907 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,16 @@ -4/9/2015 Oleg Moskalenko -Version 4.4.5.1 'Ardee West': +5/29/2015 Oleg Moskalenko +Version 4.4.5.2 'Ardee West': - dual allocation adjusted according to the new TURN-bis draft; - options sha256, sha384, sha512 retired as non-standard; - third-party authorization (oAuth) updated according to the version 14 of the draft; - - C++ fixes; + - C++ compilation fixes; - cosmetic fixes; + - fixed binary package for CentOS 7.1; + - support for older SQLite versions added; + - compilation support for older CentOS release 5.x added; + - Issue 11 fixed; + - Issue 12 fixed. 3/31/2015 Oleg Moskalenko Version 4.4.4.2 'Ardee West': diff --git a/configure b/configure index 963f6606..4d5f61f0 100755 --- a/configure +++ b/configure @@ -1169,33 +1169,11 @@ fi if [ -z "${TURN_NO_SCTP}" ] ; then if [ -z "${TURN_SCTP_INCLUDE}" ] ; then - if [ -f /usr/include/linux/sctp.h ] ; then - TURN_SCTP_INCLUDE="-DTURN_SCTP_INCLUDE=\"\\\"/usr/include/linux/sctp.h\\\"\"" - elif [ -f /usr/include/netinet/sctp.h ] ; then - TURN_SCTP_INCLUDE="-DTURN_SCTP_INCLUDE=\"\"" - else - if ! [ "${PREFIX}" = "/usr" ] ; then - if ! [ "${PREFIX}" = "/usr/local" ] ; then - TURN_SCTP_INCLUDE=`${FIND_CMD} ${PREFIX}/include/ -name sctp.h` + if [ -f /usr/include/netinet/sctp.h ] ; then + TURN_SCTP_INCLUDE="-DTURN_SCTP_INCLUDE=\"\"" fi - fi - if [ -z "${TURN_SCTP_INCLUDE}" ] ; then - TURN_SCTP_INCLUDE=`${FIND_CMD} /usr/local/include/ -name sctp.h` - fi - if [ -z "${TURN_SCTP_INCLUDE}" ] ; then - TURN_SCTP_INCLUDE=`${FIND_CMD} /usr/include/ -name sctp.h` - fi - if [ -z "${TURN_SCTP_INCLUDE}" ] ; then - TURN_NO_SCTP="-DTURN_NO_SCTP" - else - for ip in ${TURN_SCTP_INCLUDE} ; do - TURN_SCTP_INCLUDE="-DTURN_SCTP_INCLUDE=\"\\\"${ip}\\\"\"" - break - done - fi - fi else - TURN_SCTP_INCLUDE="-DTURN_SCTP_INCLUDE=\"\\\"${TURN_SCTP_INCLUDE}\\\"\"" + TURN_SCTP_INCLUDE="-DTURN_SCTP_INCLUDE=\"\\\"${TURN_SCTP_INCLUDE}\\\"\"" fi else TURN_NO_SCTP="-DTURN_NO_SCTP" diff --git a/examples/etc/turnserver.conf b/examples/etc/turnserver.conf index 3c2d828f..20b19add 100644 --- a/examples/etc/turnserver.conf +++ b/examples/etc/turnserver.conf @@ -169,7 +169,7 @@ # #lt-cred-mech -# This option is opposite to lt-cred-mech or st-cred-mech. +# This option is opposite to lt-cred-mech. # (TURN Server with no-auth option allows anonymous access). # If neither option is defined, and no users are defined, # then no-auth is default. If at least one user is defined, diff --git a/rpm/CentOS6.pre.build.sh b/rpm/CentOS6.pre.build.sh index bbbd39fc..cd801137 100755 --- a/rpm/CentOS6.pre.build.sh +++ b/rpm/CentOS6.pre.build.sh @@ -8,7 +8,6 @@ CPWD=`pwd` cd ${CPWD} -EPELRPM=epel-release-6-8.noarch.rpm LIBEVENT_MAJOR_VERSION=2 LIBEVENT_VERSION=${LIBEVENT_MAJOR_VERSION}.0.21 LIBEVENT_DISTRO=libevent-${LIBEVENT_VERSION}-stable.tar.gz @@ -78,12 +77,12 @@ fi # EPEL (for hiredis) cd ${CPWD} -./epel.install.sh +./epel6.install.sh # Platform file echo "CentOS6.6" > ${BUILDDIR}/platform -cp ${CPWD}/epel.install.sh ${BUILDDIR}/install.sh +cp ${CPWD}/epel6.install.sh ${BUILDDIR}/install.sh cd ${CPWD} diff --git a/rpm/CentOS7.pre.build.sh b/rpm/CentOS7.pre.build.sh index 45faeba3..1dda260b 100755 --- a/rpm/CentOS7.pre.build.sh +++ b/rpm/CentOS7.pre.build.sh @@ -8,8 +8,6 @@ CPWD=`pwd` cd ${CPWD} -EPELRPM=epel-release-6-8.noarch.rpm - # Common packs PACKS="libevent-devel mariadb-devel sqlite sqlite-devel" @@ -24,12 +22,12 @@ fi # EPEL (for hiredis) cd ${CPWD} -./epel.install.sh +./epel7.install.sh # Platform file -echo "CentOS7" > ${BUILDDIR}/platform +echo "CentOS7.1" > ${BUILDDIR}/platform -cp ${CPWD}/epel.install.sh ${BUILDDIR}/install.sh +cp ${CPWD}/epel7.install.sh ${BUILDDIR}/install.sh cd ${CPWD} diff --git a/rpm/build.settings.sh b/rpm/build.settings.sh index 832b8e46..dac4087c 100755 --- a/rpm/build.settings.sh +++ b/rpm/build.settings.sh @@ -2,7 +2,7 @@ # Common settings script. -TURNVERSION=4.4.5.1 +TURNVERSION=4.4.5.2 BUILDDIR=~/rpmbuild ARCH=`uname -p` TURNSERVER_SVN_URL=http://coturn.googlecode.com/svn diff --git a/rpm/epel.install.sh b/rpm/epel6.install.sh similarity index 100% rename from rpm/epel.install.sh rename to rpm/epel6.install.sh diff --git a/rpm/epel7.install.sh b/rpm/epel7.install.sh new file mode 100755 index 00000000..29322c0f --- /dev/null +++ b/rpm/epel7.install.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +CPWD=`pwd` + +# Epel installation script + +EPEL=epel-release-7-5.noarch +EPELRPM=${EPEL}.rpm +BUILDDIR=~/rpmbuild +WGETOPTIONS="--no-check-certificate" +RPMOPTIONS="-ivh --force" + +mkdir -p ${BUILDDIR} +mkdir -p ${BUILDDIR}/RPMS + +sudo yum -y install wget + +cd ${BUILDDIR}/RPMS +if ! [ -f ${EPELRPM} ] ; then + wget ${WGETOPTIONS} http://download.fedoraproject.org/pub/epel/7/x86_64/e/${EPELRPM} + ER=$? + if ! [ ${ER} -eq 0 ] ; then + cd ${CPWD} + exit -1 + fi +fi + +PACK=${EPELRPM} +sudo rpm ${RPMOPTIONS} ${PACK} +ER=$? +if ! [ ${ER} -eq 0 ] ; then + echo "Cannot install package ${PACK}" + cd ${CPWD} + exit -1 +fi + +cd ${CPWD} + + diff --git a/rpm/turnserver.spec b/rpm/turnserver.spec index c71d7cce..a09784ba 100644 --- a/rpm/turnserver.spec +++ b/rpm/turnserver.spec @@ -1,5 +1,5 @@ Name: turnserver -Version: 4.4.5.1 +Version: 4.4.5.2 Release: 0%{dist} Summary: Coturn TURN Server @@ -289,8 +289,8 @@ fi %{_includedir}/turn/client/TurnMsgLib.h %changelog -* Thu Apr 09 2015 Oleg Moskalenko - - Sync to 4.4.5.1 +* Wed May 29 2015 Oleg Moskalenko + - Sync to 4.4.5.2 * Tue Mar 31 2015 Oleg Moskalenko - Sync to 4.4.4.2 * Sun Mar 15 2015 Oleg Moskalenko diff --git a/src/apps/common/hiredis_libevent2.c b/src/apps/common/hiredis_libevent2.c index c27fba35..19adb25e 100644 --- a/src/apps/common/hiredis_libevent2.c +++ b/src/apps/common/hiredis_libevent2.c @@ -97,6 +97,8 @@ static void redisLibeventReadEvent(int fd, short event, void *arg) { if(redis_le_valid(e)) { redisAsyncHandleRead(e->context); } + } else { + redis_reconnect(e); } } diff --git a/src/apps/relay/dbdrivers/dbd_sqlite.c b/src/apps/relay/dbdrivers/dbd_sqlite.c index 222a4bb6..334b934f 100644 --- a/src/apps/relay/dbdrivers/dbd_sqlite.c +++ b/src/apps/relay/dbdrivers/dbd_sqlite.c @@ -97,6 +97,8 @@ static void sqlite_unlock(int write) static int sqlite_init_multithreaded(void) { +#if defined(SQLITE_CONFIG_MULTITHREAD) + sqlite3_shutdown(); if (sqlite3_threadsafe() > 0) { @@ -112,6 +114,7 @@ static int sqlite_init_multithreaded(void) { TURN_LOG_FUNC(TURN_LOG_LEVEL_ERROR, "Your SQLite database is not compiled to be threadsafe.\n"); return -1; } +#endif return 0; } diff --git a/src/apps/relay/mainrelay.c b/src/apps/relay/mainrelay.c index 250735b5..f0c64d87 100644 --- a/src/apps/relay/mainrelay.c +++ b/src/apps/relay/mainrelay.c @@ -1689,12 +1689,6 @@ static void print_features(unsigned long mfn) TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "\n"); -#if !defined(TURN_NO_SCTP) - TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "SCTP supported\n"); -#else - TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "SCTP is not supported\n"); -#endif - TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "Default Net Engine version: %d (%s)\n\n=====================================================\n\n", (int)turn_params.net_engine_version, turn_params.net_engine_version_txt[(int)turn_params.net_engine_version]); } diff --git a/src/apps/relay/netengine.c b/src/apps/relay/netengine.c index 7daf9187..71350d0c 100644 --- a/src/apps/relay/netengine.c +++ b/src/apps/relay/netengine.c @@ -309,7 +309,7 @@ void add_listener_addr(const char* addr) { size_t i = 0; for(i=0;i