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/tracker/tracker_http.cc

    r799 r800  
    9191  s.imbue(std::locale::classic()); 
    9292 
    93   char hash[60]; 
    94   char localId[60]; 
    95  
    96   rak::copy_escape_html(m_info->hash().begin(), m_info->hash().end(), hash); 
    97   rak::copy_escape_html(m_info->local_id().begin(), m_info->local_id().end(), localId); 
     93  char hash[61]; 
     94  char localId[61]; 
     95 
     96  *rak::copy_escape_html(m_info->hash().begin(), m_info->hash().end(), hash) = '\0'; 
     97  *rak::copy_escape_html(m_info->local_id().begin(), m_info->local_id().end(), localId) = '\0'; 
    9898 
    9999  s << m_url