diff --git a/libretroshare/src/serialiser/rsconfigitems.cc b/libretroshare/src/serialiser/rsconfigitems.cc index f0aa97f68..aaca6caff 100644 --- a/libretroshare/src/serialiser/rsconfigitems.cc +++ b/libretroshare/src/serialiser/rsconfigitems.cc @@ -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 ipTimedList; while (offset < rssize) { diff --git a/libretroshare/src/serialiser/rstlvbase.cc b/libretroshare/src/serialiser/rstlvbase.cc index 01a5f571a..d15caf5cd 100644 --- a/libretroshare/src/serialiser/rstlvbase.cc +++ b/libretroshare/src/serialiser/rstlvbase.cc @@ -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) { diff --git a/libretroshare/src/serialiser/rstlvbase.h b/libretroshare/src/serialiser/rstlvbase.h index 82038308a..e388d3b14 100644 --- a/libretroshare/src/serialiser/rstlvbase.h +++ b/libretroshare/src/serialiser/rstlvbase.h @@ -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;