Some minor refactoring, removed jemalloc and added the address sanitize

This commit is contained in:
WolverinDEV
2021-01-24 10:34:19 +01:00
parent 9784ce9351
commit ffd5b64177
6 changed files with 26 additions and 12 deletions
+6 -3
View File
@@ -62,8 +62,9 @@ PacketProcessResult PacketDecoder::process_incoming_data(ClientPacketParser &pac
#endif
#endif
auto result = this->decode_incoming_packet(error, packet_parser);
if(result != PacketProcessResult::SUCCESS)
if(result != PacketProcessResult::SUCCESS) {
return result;
}
#ifdef LOG_INCOMPING_PACKET_FRAGMENTS
debugMessage(lstream << CLIENT_LOG_PREFIX << "Recived packet. PacketId: " << packet->packetId() << " PacketType: " << packet->type().name() << " Flags: " << packet->flags() << " - " << packet->data() << endl);
@@ -108,13 +109,15 @@ PacketProcessResult PacketDecoder::process_incoming_data(ClientPacketParser &pac
ReassembledCommand* command{nullptr};
CommandReassembleResult assemble_result;
do {
if(!queue_lock.owns_lock())
if(!queue_lock.owns_lock()) {
queue_lock.lock();
}
assemble_result = this->try_reassemble_ordered_packet(fragment_buffer, queue_lock, command);
if(assemble_result == CommandReassembleResult::SUCCESS || assemble_result == CommandReassembleResult::MORE_COMMANDS_PENDING)
if(assemble_result == CommandReassembleResult::SUCCESS || assemble_result == CommandReassembleResult::MORE_COMMANDS_PENDING) {
this->callback_decoded_command(this->callback_argument, command);
}
if(command) {
/* ownership hasn't transferred */
@@ -71,14 +71,16 @@ std::string VoiceClientConnection::log_prefix() {
}
void VoiceClientConnection::triggerWrite() {
if(this->current_client->voice_server)
if(this->current_client->voice_server) {
this->current_client->voice_server->triggerWrite(dynamic_pointer_cast<VoiceClient>(this->current_client->_this.lock()));
}
}
void VoiceClientConnection::handle_incoming_datagram(const pipes::buffer_view& buffer) {
ClientPacketParser packet_parser{buffer};
if(!packet_parser.valid())
if(!packet_parser.valid()) {
return;
}
#ifndef CONNECTION_NO_STATISTICS
if(this->current_client) {