Fixed non web client compile
This commit is contained in:
parent
268dfb5bcf
commit
6564969a28
@ -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}
|
||||
)
|
||||
|
@ -1061,10 +1061,13 @@ float TSServer::averagePing() {
|
||||
if(type == ClientType::CLIENT_TEAMSPEAK || type == ClientType::CLIENT_TEASPEAK) {
|
||||
count++;
|
||||
sum += duration_cast<milliseconds>(dynamic_pointer_cast<VoiceClient>(client)->calculatePing()).count();
|
||||
} else if(type == ClientType::CLIENT_WEB) {
|
||||
}
|
||||
#ifdef COMPILE_WEB_CLIENT
|
||||
else if(type == ClientType::CLIENT_WEB) {
|
||||
count++;
|
||||
sum += duration_cast<milliseconds>(dynamic_pointer_cast<WebClient>(client)->client_ping()).count();
|
||||
}
|
||||
#endif
|
||||
});
|
||||
|
||||
if(count == 0) return 0;
|
||||
|
@ -315,8 +315,10 @@ bool ConnectedClient::notifyConnectionInfo(const shared_ptr<ConnectedClient> &ta
|
||||
//Fill in some server stuff
|
||||
if(dynamic_pointer_cast<VoiceClient>(target))
|
||||
notify["connection_ping"] = floor<milliseconds>(dynamic_pointer_cast<VoiceClient>(target)->calculatePing()).count();
|
||||
#ifdef COMPILE_WEB_CLIENT
|
||||
else if(dynamic_pointer_cast<WebClient>(target))
|
||||
notify["connection_ping"] = floor<milliseconds>(dynamic_pointer_cast<WebClient>(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();
|
||||
|
Loading…
Reference in New Issue
Block a user