diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index 90121a9..30d85bc 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -33,7 +33,7 @@ add_definitions(-DUSE_BORINGSSL) option(BUILD_TYPE "Sets the build type" OFF) option(BUILD_TYPE_NAME "Sets the build type name" OFF) option(COMPILE_WEB_CLIENT "Enable/Disable the web cleint future" OFF) -set(COMPILE_WEB_CLIENT "ON") +#set(COMPILE_WEB_CLIENT "ON") set(CMAKE_VERBOSE_MAKEFILE ON) set(SERVER_SOURCE_FILES @@ -132,6 +132,7 @@ set(SERVER_SOURCE_FILES src/weblist/TeamSpeakWebClient.cpp src/manager/ConversationManager.cpp + src/client/SpeakingClientHandshake.cpp ) if (COMPILE_WEB_CLIENT) add_definitions(-DCOMPILE_WEB_CLIENT) @@ -144,7 +145,6 @@ if (COMPILE_WEB_CLIENT) # src/server/web/WebRTCServer.cpp src/client/web/WSWebClient.cpp src/client/web/SampleHandler.cpp - src/client/SpeakingClientHandshake.cpp src/client/web/VoiceBridge.cpp ) endif () @@ -276,12 +276,12 @@ target_link_libraries(TeaSpeakServer mysqlclient.a jsoncpp_lib ${ed25519_LIBRARIES_STATIC} + ${DataPipes_LIBRARIES_SHARED} ) -if (${COMPILE_WEB_CLIENT}) +if (COMPILE_WEB_CLIENT) find_package(UsrSCTP REQUIRED) target_link_libraries(TeaSpeakServer - ${DataPipes_LIBRARIES_SHARED} ${LIBRARY_PATH_NICE} ${LIBRARY_PATH_GLIBC} ) diff --git a/server/src/TSServer.cpp b/server/src/TSServer.cpp index 95e9200..72e44c0 100644 --- a/server/src/TSServer.cpp +++ b/server/src/TSServer.cpp @@ -1061,10 +1061,13 @@ float TSServer::averagePing() { if(type == ClientType::CLIENT_TEAMSPEAK || type == ClientType::CLIENT_TEASPEAK) { count++; sum += duration_cast(dynamic_pointer_cast(client)->calculatePing()).count(); - } else if(type == ClientType::CLIENT_WEB) { + } +#ifdef COMPILE_WEB_CLIENT + else if(type == ClientType::CLIENT_WEB) { count++; sum += duration_cast(dynamic_pointer_cast(client)->client_ping()).count(); } +#endif }); if(count == 0) return 0; diff --git a/server/src/client/ConnectedClientNotifyHandler.cpp b/server/src/client/ConnectedClientNotifyHandler.cpp index 82519ea..bb0977d 100644 --- a/server/src/client/ConnectedClientNotifyHandler.cpp +++ b/server/src/client/ConnectedClientNotifyHandler.cpp @@ -315,8 +315,10 @@ bool ConnectedClient::notifyConnectionInfo(const shared_ptr &ta //Fill in some server stuff if(dynamic_pointer_cast(target)) notify["connection_ping"] = floor(dynamic_pointer_cast(target)->calculatePing()).count(); +#ifdef COMPILE_WEB_CLIENT else if(dynamic_pointer_cast(target)) notify["connection_ping"] = floor(dynamic_pointer_cast(target)->client_ping()).count(); +#endif if(target->getType() == ClientType::CLIENT_TEASPEAK || target->getType() == ClientType::CLIENT_TEAMSPEAK || target->getType() == ClientType::CLIENT_WEB) { auto report = target->connectionStatistics->full_report();