mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-07 06:02:41 -04:00
Allow Local Address to be saved and modified in hidden mode.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@7030 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
12e7d73941
commit
ee09c3ce9c
2 changed files with 8 additions and 2 deletions
|
@ -1701,7 +1701,8 @@ bool p3PeerMgrIMPL::loadList(std::list<RsItem *>& load)
|
||||||
|
|
||||||
if (pitem->netMode == RS_NET_MODE_HIDDEN)
|
if (pitem->netMode == RS_NET_MODE_HIDDEN)
|
||||||
{
|
{
|
||||||
/* set only the hidden stuff */
|
/* set only the hidden stuff & localAddress */
|
||||||
|
setLocalAddress(pitem->pid, pitem->localAddrV4.addr);
|
||||||
setHiddenDomainPort(pitem->pid, pitem->domain_addr, pitem->domain_port);
|
setHiddenDomainPort(pitem->pid, pitem->domain_addr, pitem->domain_port);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -603,9 +603,14 @@ void ServerPage::saveAddressesHiddenNode()
|
||||||
rsPeers->setVisState(ownId, vs_disc, vs_dht);
|
rsPeers->setVisState(ownId, vs_disc, vs_dht);
|
||||||
|
|
||||||
// Work out what we do with addresses!
|
// Work out what we do with addresses!
|
||||||
//rsPeers->setLocalAddress(ownId, ui.localAddress->text().toStdString(), ui.localPort->value());
|
|
||||||
//rsPeers->setExtAddress(ownId, ui.extAddress->text().toStdString(), ui.extPort->value());
|
//rsPeers->setExtAddress(ownId, ui.extAddress->text().toStdString(), ui.extPort->value());
|
||||||
|
|
||||||
|
if (detail.localPort != ui.localPort->value())
|
||||||
|
{
|
||||||
|
// Set Local Address - force to 127.0.0.1
|
||||||
|
rsPeers->setLocalAddress(ownId, "127.0.0.1", ui.localPort->value());
|
||||||
|
}
|
||||||
|
|
||||||
std::string hiddenAddr = ui.extAddress->text().toStdString();
|
std::string hiddenAddr = ui.extAddress->text().toStdString();
|
||||||
uint16_t hiddenPort = ui.extPort->value();
|
uint16_t hiddenPort = ui.extPort->value();
|
||||||
if ((hiddenAddr != detail.hiddenNodeAddress) || (hiddenPort != detail.hiddenNodePort))
|
if ((hiddenAddr != detail.hiddenNodeAddress) || (hiddenPort != detail.hiddenNodePort))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue