Fixedi nvalid channel order
This commit is contained in:
		
							parent
							
								
									431e2c28f2
								
							
						
					
					
						commit
						619e560152
					
				@ -620,7 +620,10 @@ inline void send_channels(ConnectedClient* client, ChannelIT begin, const Channe
 | 
			
		||||
 | 
			
		||||
    while(begin != end) {
 | 
			
		||||
        auto channel = (*begin)->channel();
 | 
			
		||||
        if(!channel) continue;
 | 
			
		||||
        if(!channel) {
 | 
			
		||||
            begin++;
 | 
			
		||||
            continue;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        for (const auto &elm : channel->properties().list_properties(property::FLAG_CHANNEL_VIEW, client->getType() == CLIENT_TEAMSPEAK ? property::FLAG_NEW : (uint16_t) 0)) {
 | 
			
		||||
            if(elm.type() == property::CHANNEL_ORDER)
 | 
			
		||||
@ -630,9 +633,10 @@ inline void send_channels(ConnectedClient* client, ChannelIT begin, const Channe
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        begin++;
 | 
			
		||||
        if(++index > 6)
 | 
			
		||||
        if(++index > 3)
 | 
			
		||||
            break;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if(dynamic_cast<VoiceClient*>(client)) {
 | 
			
		||||
        auto vc = dynamic_cast<VoiceClient*>(client);
 | 
			
		||||
        vc->sendCommand0(builder.build(), false, true); /* we need to process this command directly so it will be processed before the channellistfinished stuff */
 | 
			
		||||
@ -691,7 +695,7 @@ void ConnectedClient::sendChannelList(bool lock_channel_tree) {
 | 
			
		||||
    if(entry_channels.empty())
 | 
			
		||||
        logCritical(this->getServerId(), "ConnectedClient::sendChannelList => invalid (empty) own channel path!");
 | 
			
		||||
 | 
			
		||||
    send_channels(this, entry_channels.begin(), entry_channels.end(), true);
 | 
			
		||||
    send_channels(this, entry_channels.begin(), entry_channels.end(), false);
 | 
			
		||||
    this->notifyClientEnterView(_this.lock(), nullptr, "", this->currentChannel, ViewReasonId::VREASON_SYSTEM, nullptr, false); //Notify self after path is send
 | 
			
		||||
    send_channels(this, channels.begin(), channels.end(), false);
 | 
			
		||||
    //this->notifyClientEnterView(_this.lock(), nullptr, "", this->currentChannel, ViewReasonId::VREASON_SYSTEM, nullptr, false); //Notify self after path is send
 | 
			
		||||
 | 
			
		||||
@ -490,7 +490,7 @@ command_result SpeakingClient::handleCommandClientInit(Command& cmd) {
 | 
			
		||||
            clones_uid++;
 | 
			
		||||
        if(client->getPeerIp() == this->getPeerIp())
 | 
			
		||||
            clones_ip++;
 | 
			
		||||
        if(client->getHardwareId() == _own_hwid)
 | 
			
		||||
        if(!_own_hwid.empty() && client->getHardwareId() == _own_hwid)
 | 
			
		||||
            clones_hwid++;
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -420,7 +420,7 @@ bool VoiceClientConnection::prepare_packet_for_write(vector<pipes::buffer> &resu
 | 
			
		||||
 | 
			
		||||
    string error = "success";
 | 
			
		||||
 | 
			
		||||
    if(packet->type().compressable() && !packet->memory_state.fragment_entry) {
 | 
			
		||||
    if(packet->type().compressable() && !packet->memory_state.fragment_entry && false) {
 | 
			
		||||
        packet->enable_flag(PacketFlag::Compressed);
 | 
			
		||||
        if(!this->compress_handler.progressPacketOut(packet.get(), error)) {
 | 
			
		||||
            logError(this->getClient()->getServerId(), "{} Could not compress outgoing packet.\nThis could cause fatal failed for the client.\nError: {}", error);
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								shared
									
									
									
									
									
								
							
							
								
								
								
								
								
								
									
									
								
							
						
						
									
										2
									
								
								shared
									
									
									
									
									
								
							@ -1 +1 @@
 | 
			
		||||
Subproject commit d13c1e6d6812aa568b6cc7215100828016b92582
 | 
			
		||||
Subproject commit 4aec154ff161bedaa4080387ad3cf0450f1db1d3
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user