mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2025-08-18 12:45:36 +00:00
lua error fix
This commit is contained in:
parent
60c7997c6b
commit
94f6a81673
@ -179,9 +179,9 @@ void Identification(SOCKET TCPSock,Hold*S,RSA*Skey){
|
|||||||
for(auto& c : CI->Clients){
|
for(auto& c : CI->Clients){
|
||||||
if(c != nullptr){
|
if(c != nullptr){
|
||||||
if(c->GetDID() == DID){
|
if(c->GetDID() == DID){
|
||||||
error("died on " + std::string(__func__) + ":" + std::to_string(__LINE__));
|
// error("died on " + std::string(__func__) + ":" + std::to_string(__LINE__));
|
||||||
closesocket(c->GetTCPSock());
|
//closesocket(c->GetTCPSock());
|
||||||
c->SetStatus(-2);
|
//c->SetStatus(-2); ////TODO: UNCOMMENT!!
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -233,6 +233,9 @@ void GlobalParser(Client*c, const std::string& Pack){
|
|||||||
|
|
||||||
void GParser(Client*c, const std::string& Packet){
|
void GParser(Client*c, const std::string& Packet){
|
||||||
Assert(c);
|
Assert(c);
|
||||||
|
if(Packet.find("Zp") != std::string::npos && Packet.size() > 500){
|
||||||
|
abort();
|
||||||
|
}
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
__try{
|
__try{
|
||||||
GlobalParser(c, Packet);
|
GlobalParser(c, Packet);
|
||||||
|
@ -172,6 +172,10 @@ std::string UDPRcvFromClient(sockaddr_in& client) {
|
|||||||
#endif // WIN32
|
#endif // WIN32
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
Ret = Ret.substr(0,Rcv);
|
||||||
|
if(Ret.find("Zp") != std::string::npos && Ret.size() > 500){
|
||||||
|
abort();
|
||||||
|
}
|
||||||
return Ret.substr(0,Rcv);
|
return Ret.substr(0,Rcv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,6 +225,9 @@ void HandleChunk(Client* c, const std::string& Data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
void UDPParser(Client* c, std::string Packet) {
|
void UDPParser(Client* c, std::string Packet) {
|
||||||
|
if(Packet.find("Zp") != std::string::npos && Packet.size() > 500){
|
||||||
|
abort();
|
||||||
|
}
|
||||||
Assert(c);
|
Assert(c);
|
||||||
if (Packet.substr(0, 4) == "ABG:") {
|
if (Packet.substr(0, 4) == "ABG:") {
|
||||||
Packet = DeComp(Packet.substr(4));
|
Packet = DeComp(Packet.substr(4));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user