From 2368f98f3c63d823cf450e4dd14fe3a63f13d976 Mon Sep 17 00:00:00 2001 From: mom040267 Date: Tue, 7 Apr 2015 06:20:00 +0000 Subject: [PATCH] C++ and cosmetic fixes --- ChangeLog | 5 +++++ TODO | 6 ++--- rpm/build.settings.sh | 2 +- rpm/turnserver.spec | 4 +++- src/apps/relay/mainrelay.c | 38 +++++++++++++++++++++++++++++--- src/apps/stunclient/stunclient.c | 4 ++-- src/ns_turn_defs.h | 2 +- 7 files changed, 50 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index e01eebf..a2d0b15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +4/6/2015 Oleg Moskalenko +Version 4.4.4.3 'Ardee West': + - C++ fixes; + - cosmetic fixes; + 3/31/2015 Oleg Moskalenko Version 4.4.4.2 'Ardee West': - SCTP fixes; diff --git a/TODO b/TODO index ec826dd..038548f 100644 --- a/TODO +++ b/TODO @@ -59,9 +59,9 @@ 2) Redirect draft. -3) STUN-Bis: - a. SCTP - b. New integrity attribute, algorithms +3) STUN-bis: new integrity attribute, algorithms. + +4) TURN-bis: dual allocation fixes. ================================================================== diff --git a/rpm/build.settings.sh b/rpm/build.settings.sh index 9af5ffe..5259873 100755 --- a/rpm/build.settings.sh +++ b/rpm/build.settings.sh @@ -2,7 +2,7 @@ # Common settings script. -TURNVERSION=4.4.4.2 +TURNVERSION=4.4.4.3 BUILDDIR=~/rpmbuild ARCH=`uname -p` TURNSERVER_SVN_URL=http://coturn.googlecode.com/svn diff --git a/rpm/turnserver.spec b/rpm/turnserver.spec index c35875e..dc50743 100644 --- a/rpm/turnserver.spec +++ b/rpm/turnserver.spec @@ -1,5 +1,5 @@ Name: turnserver -Version: 4.4.4.2 +Version: 4.4.4.3 Release: 0%{dist} Summary: Coturn TURN Server @@ -289,6 +289,8 @@ fi %{_includedir}/turn/client/TurnMsgLib.h %changelog +* Mon Apr 06 2015 Oleg Moskalenko + - Sync to 4.4.4.3 * Tue Mar 31 2015 Oleg Moskalenko - Sync to 4.4.4.2 * Sun Mar 15 2015 Oleg Moskalenko diff --git a/src/apps/relay/mainrelay.c b/src/apps/relay/mainrelay.c index 48df9ac..eca7c6a 100644 --- a/src/apps/relay/mainrelay.c +++ b/src/apps/relay/mainrelay.c @@ -1650,6 +1650,17 @@ static void print_features(unsigned long mfn) TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "\n\n==== Show him the instruments, Practical Frost: ====\n\n"); +/* + Frost stepped forward and opened the polished case with a theatrical + flourish. It was a masterful piece of craftsmanship. As the lid was + pulled back, the many trays inside lifted and fanned out, displaying + Glokta’s tools in all their gruesome glory. There were blades of every + size and shape, needles curved and straight, bottles of oil and acid, + nails and screws, clamps and pliers, saws, hammers, chisels. Metal, wood + and glass glittered in the bright lamplight, all polished to mirror + brightness and honed to a murderous sharpness. +*/ + #if !TLS_SUPPORTED TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "TLS is not supported\n"); #else @@ -1660,14 +1671,29 @@ static void print_features(unsigned long mfn) TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "DTLS is not supported\n"); #else TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "DTLS supported\n"); +#if DTLSv1_2_SUPPORTED + TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "DTLS 1.2 supported\n"); +#else + TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "DTLS 1.2 is not supported\n"); +#endif +#endif + +#if ALPN_SUPPORTED + TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "TURN/STUN ALPN supported\n"); +#else + TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "TURN/STUN ALPN is not supported\n"); #endif #if defined(TURN_NO_GCM) TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "AEAD is not supported\n"); #else - TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "AEAD supported\n"); + TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "AEAD GCM supported\n"); #endif + TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "OpenSSL compile-time version: %s\n",OPENSSL_VERSION_TEXT); + + TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "\n"); + #if !defined(TURN_NO_SQLITE) TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "SQLite supported, default database location is %s\n",DEFAULT_USERDB_FILE); #else @@ -1698,7 +1724,13 @@ static void print_features(unsigned long mfn) TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "MongoDB is not supported\n"); #endif - TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "OpenSSL compile-time version: %s\n",OPENSSL_VERSION_TEXT); + 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]); @@ -2657,7 +2689,7 @@ static void openssl_setup(void) #if DTLSv1_2_SUPPORTED turn_params.dtls_ctx = SSL_CTX_new(DTLS_server_method()); turn_params.dtls_ctx_v1_2 = SSL_CTX_new(DTLSv1_2_server_method()); - set_ctx(turn_params.dtls_ctx_v1_2,"DTLS1,2"); + set_ctx(turn_params.dtls_ctx_v1_2,"DTLS1.2"); SSL_CTX_set_read_ahead(turn_params.dtls_ctx_v1_2, 1); #else turn_params.dtls_ctx = SSL_CTX_new(DTLSv1_server_method()); diff --git a/src/apps/stunclient/stunclient.c b/src/apps/stunclient/stunclient.c index 85457a2..c54a476 100644 --- a/src/apps/stunclient/stunclient.c +++ b/src/apps/stunclient/stunclient.c @@ -67,7 +67,7 @@ static int run_stunclient(const char* rip, int rport, int *port, int *rfc5780, i err(-1, NULL); if (!addr_any(&real_local_addr)) { - if (addr_bind(udp_fd, &real_local_addr,0,1) < 0) + if (addr_bind(udp_fd, &real_local_addr,0,1,UDP_SOCKET) < 0) err(-1, NULL); } } @@ -80,7 +80,7 @@ static int run_stunclient(const char* rip, int rport, int *port, int *rfc5780, i addr_set_port(&real_local_addr, response_port); - if (addr_bind(new_udp_fd, &real_local_addr, 0, 1) < 0) + if (addr_bind(new_udp_fd, &real_local_addr, 0, 1, UDP_SOCKET) < 0) err(-1, NULL); } diff --git a/src/ns_turn_defs.h b/src/ns_turn_defs.h index 21241f6..4f066ea 100644 --- a/src/ns_turn_defs.h +++ b/src/ns_turn_defs.h @@ -31,7 +31,7 @@ #ifndef __IOADEFS__ #define __IOADEFS__ -#define TURN_SERVER_VERSION "4.4.4.2" +#define TURN_SERVER_VERSION "4.4.4.3" #define TURN_SERVER_VERSION_NAME "Ardee West" #define TURN_SOFTWARE "Coturn-" TURN_SERVER_VERSION " '" TURN_SERVER_VERSION_NAME "'"