add some various tests to avoid ip address 0 bugs

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1910 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2009-12-18 21:45:13 +00:00
parent 2d8f30c2c7
commit 10cd455519
2 changed files with 56 additions and 7 deletions

View file

@ -284,6 +284,7 @@ void pqipersongrp::statusChange(const std::list<pqipeer> &plist)
if (it->actions & RS_PEER_CONNECT_REQ)
{
connectPeer(it->id);
}
}
@ -396,7 +397,13 @@ int pqipersongrp::connectPeer(std::string id)
#endif
{ RsStackMutex stack(coreMtx); /**************** LOCKED MUTEX ****************/
std::map<std::string, SearchModule *>::iterator it;
if (id == mConnMgr->getOwnId()) {
#ifdef CONN_DEBUG
rslog(RSL_WARNING, p3connectzone, "pqipersongrp::connectPeer() Failed, connecting to own id.");
#endif
return 0;
}
std::map<std::string, SearchModule *>::iterator it;
it = mods.find(id);
if (it == mods.end())
{