Show
Ignore:
Timestamp:
11/04/06 11:05:28 (6 years ago)
Author:
rakshasa
Message:

* Properly nul-terminate the info hash and client id in the tracker
request.

* Implemented options for read-ahead of
chunks. 'preload_min_pipelined', 'preload_min_size' and
'preload_required_rate' are used to decide when to read-ahead a chunk.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/libtorrent/src/protocol/handshake.cc

    r799 r800  
    418418      // Have the download from the encrypted handshake, make sure it 
    419419      // matches the BT handshake. 
    420       if (m_download->info()->hash() != (char*)m_readBuffer.position()) 
     420      if (m_download->info()->hash().not_equal_to((char*)m_readBuffer.position())) 
    421421        throw handshake_error(ConnectionManager::handshake_failed, EH_InvalidValue); 
    422422 
     
    429429 
    430430  } else { 
    431     if (m_download->info()->hash() != (char*)m_readBuffer.position()) 
     431    if (m_download->info()->hash().not_equal_to((char*)m_readBuffer.position())) 
    432432      throw handshake_error(ConnectionManager::handshake_failed, EH_InvalidValue); 
    433433  }