From 6f651c4a3c5f5b2776c4e99e8c58eaf627901bac Mon Sep 17 00:00:00 2001 From: joss17 Date: Fri, 26 Feb 2010 23:43:10 +0000 Subject: [PATCH] small change in p3disc logs git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2441 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/serialiser/rsconfigitems.cc | 7 +++++++ libretroshare/src/services/p3disc.cc | 5 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/libretroshare/src/serialiser/rsconfigitems.cc b/libretroshare/src/serialiser/rsconfigitems.cc index 7cdfaf68d..f0aa97f68 100644 --- a/libretroshare/src/serialiser/rsconfigitems.cc +++ b/libretroshare/src/serialiser/rsconfigitems.cc @@ -773,6 +773,13 @@ std::ostream &RsPeerNetItem::print(std::ostream &out, uint16_t indent) out << "currentremoteaddr: " << inet_ntoa(currentremoteaddr.sin_addr); out << ":" << htons(currentremoteaddr.sin_port) << std::endl; + printIndent(out, int_Indent); + out << "ipAdressList: size : " << ipAddressList.size() << ", adresses : " << std::endl; + for (std::list::iterator ipListIt = ipAddressList.begin(); ipListIt!=(ipAddressList.end()); ipListIt++) { + printIndent(out, int_Indent); + out << inet_ntoa(ipListIt->ipAddr.sin_addr) << ":" << ntohs(ipListIt->ipAddr.sin_port) << " seenTime : " << ipListIt->seenTime << std::endl; + } + printRsItemEnd(out, "RsPeerNetItem", indent); return out; } diff --git a/libretroshare/src/services/p3disc.cc b/libretroshare/src/services/p3disc.cc index 08d95e3be..397c65247 100644 --- a/libretroshare/src/services/p3disc.cc +++ b/libretroshare/src/services/p3disc.cc @@ -352,7 +352,6 @@ void p3disc::sendPeerDetails(std::string to, std::string about) { rsPeerNetItem->ipAddressList = detail.getIpAddressList(); di->rsPeerList.push_back(*rsPeerNetItem); - } //send own details @@ -524,7 +523,7 @@ void p3disc::recvPeerDetails(RsDiscReply *item) addDiscoveryData(item->PeerId(), pitem->pid, pitem->currentlocaladdr, pitem->currentremoteaddr, 0, time(NULL)); #ifdef P3DISC_DEBUG - std::cerr << "pp3disc::recvPeerFriendMsg() Peer Config Item:" << std::endl; + std::cerr << "p3disc::recvPeerFriendMsg() Peer Config Item:" << std::endl; pitem->print(std::cerr, 10); std::cerr << std::endl; #endif @@ -534,7 +533,7 @@ void p3disc::recvPeerDetails(RsDiscReply *item) //|| { mConnMgr->addFriend(pitem->pid, pitem->gpg_id, pitem->netMode, RS_VIS_STATE_NODISC, 0); //add with no disc by default. If friend already exist, it will do nothing } else if (pitem->lastContact > ((uint32_t)deletedSSLFriendsIds[pitem->pid] + 3600*24)) { // the friend was seen up and running 24 hours after we deleted it, we will readd it - mConnMgr->addFriend(pitem->pid, pitem->gpg_id, pitem->netMode, RS_VIS_STATE_NODISC, 0); //add with no disc bay default. If friend already exist, it will do nothing + mConnMgr->addFriend(pitem->pid, pitem->gpg_id, pitem->netMode, RS_VIS_STATE_NODISC, 0); //add with no disc by default. If friend already exist, it will do nothing } RsPeerDetails storedDetails; if (rsPeers->getPeerDetails(pitem->pid, storedDetails) //update only if we got a detail