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:
drbob 2014-01-18 05:05:35 +00:00
parent 12e7d73941
commit ee09c3ce9c
2 changed files with 8 additions and 2 deletions

View File

@ -1701,7 +1701,8 @@ bool p3PeerMgrIMPL::loadList(std::list<RsItem *>& load)
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);
}

View File

@ -603,9 +603,14 @@ void ServerPage::saveAddressesHiddenNode()
rsPeers->setVisState(ownId, vs_disc, vs_dht);
// 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());
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();
uint16_t hiddenPort = ui.extPort->value();
if ((hiddenAddr != detail.hiddenNodeAddress) || (hiddenPort != detail.hiddenNodePort))