mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-24 00:31:32 -04:00
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:
parent
b7ace087e6
commit
76d5072624
13 changed files with 100 additions and 42 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue