Report unhandled packets in string form.

This commit is contained in:
2020-08-22 19:19:46 +02:00
parent 0ac600e223
commit 43f2def80b
5 changed files with 242 additions and 4 deletions

View File

@@ -20,7 +20,7 @@ void CNShardServer::handlePacket(CNSocket* sock, CNPacketData* data) {
if (ShardPackets.find(data->type) != ShardPackets.end())
ShardPackets[data->type](sock, data);
else
std::cerr << "OpenFusion: SHARD UNIMPLM ERR. PacketType: " << data->type << std::endl;
std::cerr << "OpenFusion: SHARD UNIMPLM ERR. PacketType: " << Defines::p2str(CL2FE, data->type) << " (" << data->type << ")" << std::endl;
}
void CNShardServer::killConnection(CNSocket* cns) {
@@ -46,4 +46,4 @@ void CNShardServer::onTimer() {
sP_FE2CL_REQ_LIVE_CHECK* data = (sP_FE2CL_REQ_LIVE_CHECK*)xmalloc(sizeof(sP_FE2CL_REQ_LIVE_CHECK));
pair.first->sendPacket(new CNPacketData((void*)data, P_FE2CL_REQ_LIVE_CHECK, sizeof(sP_FE2CL_REQ_LIVE_CHECK), pair.first->getFEKey()));
}
}
}