Fixed a crash related to file transfers

This commit is contained in:
WolverinDEV
2021-01-03 17:16:23 +01:00
parent 6a502e23f2
commit 960186d55e
7 changed files with 112 additions and 72 deletions
-8
View File
@@ -23,9 +23,6 @@ using namespace ts::protocol;
//#define PKT_LOG_VOICE
//#define PKT_LOG_WHISPER
constexpr static auto kMaxWhisperClientNameLength{30};
constexpr static auto kWhisperClientUniqueIdLength{28}; /* base64 encoded SHA1 hash */
constexpr static auto kWhisperMaxHeaderLength{2 + 2 + 1 + 2 + kWhisperClientUniqueIdLength + 1 + kMaxWhisperClientNameLength};
SpeakingClient::SpeakingClient(sql::SqlManager *a, const std::shared_ptr<VirtualServer> &b) : ConnectedClient(a, b), whisper_handler_{this} {
speak_begin = std::chrono::system_clock::now();
@@ -78,11 +75,6 @@ inline bool update_whisper_error(std::chrono::system_clock::time_point& last) {
return false;
}
#define TEST_PARM(type) \
do {\
if(!cmd[0][key].castable<type>())\
return {findError("parameter_invalid"), "Invalid type for " + key};\
} while(false)
auto regex_wildcard = std::regex(".*");