From c90714c5bd32baf77a3e47393a94dbdcfee87834 Mon Sep 17 00:00:00 2001 From: joss17 Date: Fri, 18 Dec 2009 23:35:40 +0000 Subject: [PATCH] finally got the address list bug : you've got to duplicate the list in order to send the message git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1917 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/services/p3disc.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libretroshare/src/services/p3disc.cc b/libretroshare/src/services/p3disc.cc index e35bd532c..106118a79 100644 --- a/libretroshare/src/services/p3disc.cc +++ b/libretroshare/src/services/p3disc.cc @@ -366,7 +366,8 @@ void p3disc::sendOwnDetails(std::string to) std::cerr << "p3disc::sendOwnDetails() detail.currentlocaladdr.sin_addr : " << inet_ntoa(detail.currentlocaladdr.sin_addr) << ":" << ntohs(detail.currentlocaladdr.sin_port) << std::endl; std::cerr << "p3disc::sendOwnDetails() detail.currentserveraddr.sin_addr : " << inet_ntoa(detail.currentserveraddr.sin_addr) << ":" << ntohs(detail.currentlocaladdr.sin_port) << std::endl; #endif - di -> ipAddressList = detail.getIpAddressList(); + + di -> ipAddressList = std::list (detail.getIpAddressList()); //duplicate the list to build the item di -> contact_tf = 0; /* construct disc flags */ @@ -442,7 +443,7 @@ void p3disc::sendPeerDetails(std::string to, std::string about) di -> aboutId = about; // set the ip addresses. - di -> ipAddressList = detail.getIpAddressList(); + di -> ipAddressList = std::list (detail.getIpAddressList()); //duplicate the list to build the item di -> currentladdr = detail.currentlocaladdr; di -> currentsaddr = detail.currentserveraddr; @@ -644,8 +645,7 @@ void p3disc::recvPeerOwnMsg(RsDiscOwnItem *item) flags |= RS_NET_FLAGS_STABLE_UDP; } - std::list emptyAddressList; //no address list for own disc message - mConnMgr->peerStatus(item->PeerId(), item->laddr, item->saddr, emptyAddressList, + mConnMgr->peerStatus(item->PeerId(), item->laddr, item->saddr, item->ipAddressList, type, flags, RS_CB_PERSON); /* also add as potential stun buddy */