Show
Ignore:
Timestamp:
02/28/08 14:54:36 (4 years ago)
Author:
rakshasa
Message:

* Added {get/set}_xmlrpc_size_limit to allow the user to specify
larger buffer size for handling direct loading of torrents through
xmlrpc.

* Allow file and tracker targets with the compact xmlrpc syntax,
e.g. "<infohash>:f<id>".

* Fixed an alignment bug in the DHT code.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/libtorrent/src/dht/dht_node.cc

    r1013 r1040  
    4141#include "torrent/object.h" 
    4242 
     43// For SACompact... 
     44#include "download/download_info.h" 
     45 
    4346#include "dht_node.h" 
    4447 
     
    7477DhtNode::store_compact(char* buffer) const { 
    7578  HashString::cast_from(buffer)->assign(data()); 
    76   *(uint32_t*) (buffer+20) = address()->sa_inet()->address_n(); 
    77   *(uint16_t*) (buffer+24) = address()->sa_inet()->port_n(); 
    78   return buffer+26; 
     79 
     80  SocketAddressCompact sa(address()->sa_inet()); 
     81  std::memcpy(buffer + 20, sa.c_str(), 6); 
     82 
     83  return buffer + 26; 
    7984} 
    8085