mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-14 18:34:29 -05:00
Add the setDynDNS to the confcertdialog
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2756 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
50e2e5f672
commit
d70e7a3b71
@ -2691,7 +2691,7 @@ bool p3ConnectMgr::setDynDNS(std::string id, std::string dyndns)
|
||||
if (mOthersList.end() == (it = mOthersList.find(id)))
|
||||
{
|
||||
#ifdef CONN_DEBUG
|
||||
std::cerr << "p3ConnectMgr::setLocalAddress() cannot add addres info : peer id not found in friend list id: " << id << std::endl;
|
||||
std::cerr << "p3ConnectMgr::setDynDNS() cannot add dyn dns info : peer id not found in friend list id: " << id << std::endl;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
@ -733,6 +733,9 @@ bool p3Peers::setExtAddress(std::string id, std::string addr_str, uint16_t port
|
||||
|
||||
bool p3Peers::setDynDNS(std::string id, std::string dyndns)
|
||||
{
|
||||
#ifdef P3PEERS_DEBUG
|
||||
std::cerr << "p3Peers::setDynDNS() called with id: " << id << " dyndns: " << dyndns <<std::endl;
|
||||
#endif
|
||||
return mConnMgr->setDynDNS(id, dyndns);
|
||||
}
|
||||
|
||||
|
@ -150,6 +150,8 @@ void ConfCertDialog::loadDialog()
|
||||
ui.extAddress->setText(QString::fromStdString(detail.extAddr));
|
||||
ui.extPort -> setValue(detail.extPort);
|
||||
|
||||
ui.dynDNS->setText(QString::fromStdString(detail.dyndns));
|
||||
|
||||
ui.ipAddressList->clear();
|
||||
for(std::list<std::string>::const_iterator it(detail.ipAddressList.begin());it!=detail.ipAddressList.end();++it)
|
||||
ui.ipAddressList->addItem(QString::fromStdString(*it));
|
||||
@ -311,7 +313,7 @@ void ConfCertDialog::applyDialog()
|
||||
/* check if the data is the same */
|
||||
bool localChanged = false;
|
||||
bool extChanged = false;
|
||||
bool fwChanged = false;
|
||||
bool dnsChanged = false;
|
||||
|
||||
/* set local address */
|
||||
if ((detail.localAddr != ui.localAddress->text().toStdString()) || (detail.localPort != ui.localPort -> value()))
|
||||
@ -320,6 +322,9 @@ void ConfCertDialog::applyDialog()
|
||||
if ((detail.extAddr != ui.extAddress->text().toStdString()) || (detail.extPort != ui.extPort -> value()))
|
||||
extChanged = true;
|
||||
|
||||
if ((detail.dyndns != ui.dynDNS->text().toStdString()))
|
||||
dnsChanged = true;
|
||||
|
||||
/* now we can action the changes */
|
||||
if (localChanged)
|
||||
rsPeers->setLocalAddress(mId, ui.localAddress->text().toStdString(), ui.localPort->value());
|
||||
@ -327,7 +332,10 @@ void ConfCertDialog::applyDialog()
|
||||
if (extChanged)
|
||||
rsPeers->setExtAddress(mId,ui.extAddress->text().toStdString(), ui.extPort->value());
|
||||
|
||||
if(localChanged || extChanged)
|
||||
if (dnsChanged)
|
||||
rsPeers->setDynDNS(mId, ui.dynDNS->text().toStdString());
|
||||
|
||||
if(localChanged || extChanged || dnsChanged)
|
||||
emit configChanged() ;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user