mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-04-25 09:29:23 -04:00
fixed bug in getPeerDetails causing callstacks to be displayed for non initialised IPs
This commit is contained in:
parent
b70057a540
commit
2072ca4ade
@ -296,8 +296,17 @@ bool p3Peers::getPeerDetails(const RsPeerId& id, RsPeerDetails &d)
|
|||||||
d.hiddenNodeAddress = ps.hiddenDomain;
|
d.hiddenNodeAddress = ps.hiddenDomain;
|
||||||
d.hiddenNodePort = ps.hiddenPort;
|
d.hiddenNodePort = ps.hiddenPort;
|
||||||
d.hiddenType = ps.hiddenType;
|
d.hiddenType = ps.hiddenType;
|
||||||
|
|
||||||
|
if(sockaddr_storage_isnull(ps.localaddr)) // that happens if the address is not initialised.
|
||||||
|
{
|
||||||
|
d.localAddr = "INVALID_IP";
|
||||||
|
d.localPort = 0 ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
d.localAddr = sockaddr_storage_iptostring(ps.localaddr);
|
d.localAddr = sockaddr_storage_iptostring(ps.localaddr);
|
||||||
d.localPort = sockaddr_storage_port(ps.localaddr);
|
d.localPort = sockaddr_storage_port(ps.localaddr);
|
||||||
|
}
|
||||||
d.extAddr = "hidden";
|
d.extAddr = "hidden";
|
||||||
d.extPort = 0;
|
d.extPort = 0;
|
||||||
d.dyndns = "";
|
d.dyndns = "";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user