add ext address detector when connectiong to peers

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1882 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2009-12-14 18:11:19 +00:00
parent b7ace087e6
commit 76d5072624
13 changed files with 100 additions and 42 deletions

View file

@ -156,7 +156,7 @@ int pqiperson::notifyEvent(NetInterface *ni, int newState)
}
/* find the pqi, */
pqiconnect *pqi = NULL;
pqiconnect *pqi = NULL;
uint32_t type = 0;
std::map<uint32_t, pqiconnect *>::iterator it;
@ -193,8 +193,11 @@ int pqiperson::notifyEvent(NetInterface *ni, int newState)
case CONNECT_SUCCESS:
/* notify */
if (pqipg)
pqipg->notifyConnect(PeerId(), type, true);
if (pqipg) {
struct sockaddr_in remote_peer_address;
pqi->getConnectAddress(remote_peer_address);
pqipg->notifyConnect(PeerId(), type, true, remote_peer_address);
}
if ((active) && (activepqi != pqi)) // already connected - trouble
{