removed Client::isFetchingBlocks
authorPerttu Ahola <celeron55@gmail.com>
Fri, 7 Jan 2011 12:53:01 +0000 (14:53 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Fri, 7 Jan 2011 12:53:01 +0000 (14:53 +0200)
src/client.cpp
src/client.h

index b86fbf09e41e332107fae4f2e6be4baf94ee208c..103f20c3c4e7c2c63dd7c625e1008ea4f534fe18 100644 (file)
@@ -1232,25 +1232,6 @@ void Client::Send(u16 channelnum, SharedBuffer<u8> data, bool reliable)
        m_con.Send(PEER_ID_SERVER, channelnum, data, reliable);
 }
 
-bool Client::isFetchingBlocks()
-{
-       JMutexAutoLock conlock(m_con_mutex);
-       con::Peer *peer = m_con.GetPeerNoEx(PEER_ID_SERVER);
-       // Not really fetching but can't fetch more.
-       if(peer == NULL) return true;
-
-       con::Channel *channel = &(peer->channels[1]);
-       /*
-               NOTE: Channel 0 should always be used for fetching blocks,
-                     and for nothing else.
-       */
-       if(channel->incoming_reliables.size() > 0)
-               return true;
-       if(channel->outgoing_reliables.size() > 0)
-               return true;
-       return false;
-}
-
 IncomingPacket Client::getPacket()
 {
        JMutexAutoLock lock(m_incoming_queue_mutex);
index c56b615cb6d86edb08dcd3684ce1a2a2ee20ae3a..b96ddcbcf9776baa1600fa2ff4f06e6a775d2b1d 100644 (file)
@@ -145,9 +145,6 @@ public:
        bool AsyncProcessData();
        void Send(u16 channelnum, SharedBuffer<u8> data, bool reliable);
 
-       //TODO: Remove
-       bool isFetchingBlocks();
-
        // Pops out a packet from the packet queue
        IncomingPacket getPacket();