mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-05 12:51:08 -05:00
fixed compatibility issue with dyndns patch
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5.0@2785 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
c7db07c37b
commit
d451adc1a6
@ -901,6 +901,17 @@ RsPeerNetItem *RsPeerConfigSerialiser::deserialiseNet(void *data, uint32_t *size
|
||||
ok &= GetTlvIpAddrPortV4(data, rssize, &offset, TLV_TYPE_IPV4_LOCAL, &(item->currentlocaladdr));
|
||||
ok &= GetTlvIpAddrPortV4(data, rssize, &offset, TLV_TYPE_IPV4_REMOTE, &(item->currentremoteaddr));
|
||||
|
||||
// This is for compatibility with DYNDNS transfer. This code shoudl be removed some weeks after the
|
||||
// version with dns code is released.
|
||||
//
|
||||
std::string tmpstr ;
|
||||
if(GetTlvString(data, rssize, &offset, TLV_TYPE_STR_DYNDNS, tmpstr))
|
||||
std::cerr << "Got a DYNDNS entry in p3disc. Peer is using a more recent version. Skipping this entry." << std::endl ;
|
||||
#ifdef RSSERIAL_DEBUG
|
||||
else
|
||||
std::cerr << "no DNS entry." << std::endl ;
|
||||
#endif
|
||||
|
||||
//get the ip adress list
|
||||
std::list<IpAddressTimed> ipTimedList;
|
||||
while (offset < rssize) {
|
||||
|
@ -38,7 +38,7 @@ inline void* right_shift_void_pointer(void* p, uint32_t len) {
|
||||
}
|
||||
//*********************
|
||||
|
||||
#define TLV_BASE_DEBUG 1
|
||||
// #define TLV_BASE_DEBUG 1
|
||||
|
||||
/**** Basic TLV Functions ****/
|
||||
uint16_t GetTlvSize(void *data) {
|
||||
|
@ -155,6 +155,7 @@ const uint16_t TLV_TYPE_STR_HASH_ED2K = 0x0071;
|
||||
const uint16_t TLV_TYPE_IPV4_LOCAL = 0x0080;
|
||||
const uint16_t TLV_TYPE_IPV4_REMOTE = 0x0081;
|
||||
const uint16_t TLV_TYPE_IPV4_LAST = 0x0082;
|
||||
const uint16_t TLV_TYPE_STR_DYNDNS = 0x0083;
|
||||
|
||||
/*** MORE STRING IDS ****/
|
||||
const uint16_t TLV_TYPE_STR_GROUPID = 0x00a0;
|
||||
|
Loading…
Reference in New Issue
Block a user