mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 08:59:37 -05:00
Bugfix: missing TCP connection call - when peer is found on the DHT.
* save IP address for DHT display. * store Action in action Queue (the BUG). git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4620 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
5ea8cfb67d
commit
febcfc9bd3
@ -222,7 +222,7 @@ void convertBdPeerToRsDhtPeer(RsDhtPeer &peer, const bdPeer &int_peer)
|
|||||||
void convertDhtPeerDetailsToRsDhtNetPeer(RsDhtNetPeer &status, const DhtPeerDetails &details)
|
void convertDhtPeerDetailsToRsDhtNetPeer(RsDhtNetPeer &status, const DhtPeerDetails &details)
|
||||||
{
|
{
|
||||||
std::ostringstream out;
|
std::ostringstream out;
|
||||||
bdStdPrintNodeId(out, &(details.mDhtId.id));
|
bdStdPrintId(out, &(details.mDhtId));
|
||||||
|
|
||||||
status.mDhtId = out.str();
|
status.mDhtId = out.str();
|
||||||
status.mRsId = details.mRsId;
|
status.mRsId = details.mRsId;
|
||||||
|
@ -135,6 +135,8 @@ int p3BitDht::PeerCallback(const bdId *id, uint32_t status)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sockaddr_clear(&(dpd->mDhtId.addr));
|
||||||
|
|
||||||
switch(status)
|
switch(status)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
@ -151,12 +153,14 @@ int p3BitDht::PeerCallback(const bdId *id, uint32_t status)
|
|||||||
|
|
||||||
case BITDHT_MGR_QUERY_PEER_UNREACHABLE:
|
case BITDHT_MGR_QUERY_PEER_UNREACHABLE:
|
||||||
dpd->mDhtState = RSDHT_PEERDHT_UNREACHABLE;
|
dpd->mDhtState = RSDHT_PEERDHT_UNREACHABLE;
|
||||||
|
dpd->mDhtId = *id; // set the IP:Port of the unreachable peer.
|
||||||
UnreachablePeerCallback_locked(id, status, dpd);
|
UnreachablePeerCallback_locked(id, status, dpd);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BITDHT_MGR_QUERY_PEER_ONLINE:
|
case BITDHT_MGR_QUERY_PEER_ONLINE:
|
||||||
dpd->mDhtState = RSDHT_PEERDHT_ONLINE;
|
dpd->mDhtState = RSDHT_PEERDHT_ONLINE;
|
||||||
|
dpd->mDhtId = *id; // set the IP:Port of the Online peer.
|
||||||
OnlinePeerCallback_locked(id, status, dpd);
|
OnlinePeerCallback_locked(id, status, dpd);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -269,6 +273,7 @@ int p3BitDht::OnlinePeerCallback_locked(const bdId *id, uint32_t /*status*/, Dht
|
|||||||
ca.mDestId = *id;
|
ca.mDestId = *id;
|
||||||
ca.mAnswer = BITDHT_CONNECT_ERROR_NONE;
|
ca.mAnswer = BITDHT_CONNECT_ERROR_NONE;
|
||||||
|
|
||||||
|
mActions.push_back(ca);
|
||||||
//ConnectCalloutTCPAttempt(dpd->mRsId, id->addr);
|
//ConnectCalloutTCPAttempt(dpd->mRsId, id->addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user