mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge pull request #1661 from G10h4ck/short_invites_fixup
Fix setting port when adding from short invite with dyndns
This commit is contained in:
commit
423f20231c
@ -1147,7 +1147,18 @@ bool p3PeerMgrIMPL::addSslOnlyFriend(
|
||||
/* At this point if we got info about the peer just update with the new
|
||||
* values. */
|
||||
if(!dt.name.empty()) pstate.name = dt.name;
|
||||
if(!dt.dyndns.empty()) pstate.dyndns = dt.dyndns;
|
||||
if(!dt.dyndns.empty())
|
||||
{
|
||||
pstate.dyndns = dt.dyndns;
|
||||
if(dt.extPort)
|
||||
{
|
||||
/* If there is no IPv4 address available yet add a placeholder to
|
||||
* not loose the port, because the address is invalid. */
|
||||
if(!sockaddr_storage_isValidNet(pstate.serveraddr))
|
||||
sockaddr_storage_inet_pton(pstate.serveraddr, "192.0.2.0");
|
||||
sockaddr_storage_setport(pstate.serveraddr, dt.extPort);
|
||||
}
|
||||
}
|
||||
pstate.hiddenNode = dt.isHiddenNode;
|
||||
if(!dt.hiddenNodeAddress.empty())
|
||||
pstate.hiddenDomain = dt.hiddenNodeAddress;
|
||||
|
Loading…
Reference in New Issue
Block a user