mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-13 16:39:43 -05:00
removed useless IP whitelist options for hidden nodes
This commit is contained in:
parent
fe0b22e9f1
commit
c8a638c1d6
@ -435,15 +435,29 @@ void ConnectFriendWizard::initializePage(int id)
|
||||
break;
|
||||
case Page_Conclusion:
|
||||
{
|
||||
bool peerIsHiddenNode = peerDetails.isHiddenNode ;
|
||||
bool amIHiddenNode = rsPeers->isHiddenNode(rsPeers->getOwnId()) ;
|
||||
|
||||
std::cerr << "Conclusion page id : " << peerDetails.id << "; gpg_id : " << peerDetails.gpg_id << std::endl;
|
||||
|
||||
ui->_direct_transfer_CB_2 ->setChecked(false) ; //peerDetails.service_perm_flags & RS_NODE_PERM_DIRECT_DL) ;
|
||||
ui->_allow_push_CB_2 ->setChecked(peerDetails.service_perm_flags & RS_NODE_PERM_ALLOW_PUSH) ;
|
||||
ui->_require_WL_CB_2 ->setChecked(peerDetails.service_perm_flags & RS_NODE_PERM_REQUIRE_WL) ;
|
||||
|
||||
if(!peerIsHiddenNode && !amIHiddenNode)
|
||||
ui->_require_WL_CB_2 ->setChecked(peerDetails.service_perm_flags & RS_NODE_PERM_REQUIRE_WL) ;
|
||||
else
|
||||
{
|
||||
ui->_require_WL_CB_2 ->setChecked(false) ;
|
||||
ui->_require_WL_CB_2 ->hide() ;
|
||||
|
||||
ui->_addIPToWhiteList_CB_2->hide();
|
||||
ui->_addIPToWhiteList_ComboBox_2->hide();
|
||||
}
|
||||
|
||||
sockaddr_storage addr ;
|
||||
|
||||
std::cerr << "Cert IP = " << peerDetails.extAddr << std::endl;
|
||||
std::cerr << "Cert IP = " << peerDetails.extAddr << std::endl;
|
||||
|
||||
if(sockaddr_storage_ipv4_aton(addr,peerDetails.extAddr.c_str()) && sockaddr_storage_isValidNet(addr))
|
||||
{
|
||||
QString ipstring0 = QString::fromStdString(sockaddr_storage_iptostring(addr));
|
||||
@ -577,29 +591,28 @@ void ConnectFriendWizard::initializePage(int id)
|
||||
ui->fr_avatar->setFrameType(AvatarWidget::NORMAL_FRAME);
|
||||
setPixmap(QWizard::LogoPixmap, QPixmap(":/images/user/user_request48.png"));
|
||||
|
||||
ui->fr_signGPGCheckBox->setChecked(false);
|
||||
|
||||
//set the radio button to sign the GPG key
|
||||
if (peerDetails.accept_connection && !peerDetails.ownsign) {
|
||||
//gpg key connection is already accepted, don't propose to accept it again
|
||||
ui->fr_signGPGCheckBox->setChecked(false);
|
||||
ui->fr_acceptNoSignGPGCheckBox->hide();
|
||||
ui->fr_signGPGCheckBox->show();
|
||||
ui->fr_acceptNoSignGPGCheckBox->setChecked(false);
|
||||
}
|
||||
if (!peerDetails.accept_connection && peerDetails.ownsign) {
|
||||
//gpg key is already signed, don't propose to sign it again
|
||||
ui->fr_acceptNoSignGPGCheckBox->setChecked(true);
|
||||
ui->fr_signGPGCheckBox->hide();
|
||||
ui->fr_signGPGCheckBox->setChecked(false);
|
||||
}
|
||||
if (!peerDetails.accept_connection && !peerDetails.ownsign) {
|
||||
ui->fr_acceptNoSignGPGCheckBox->setChecked(true);
|
||||
ui->fr_signGPGCheckBox->show();
|
||||
ui->fr_signGPGCheckBox->setChecked(false);
|
||||
ui->fr_acceptNoSignGPGCheckBox->show();
|
||||
}
|
||||
if (peerDetails.accept_connection && peerDetails.ownsign) {
|
||||
ui->fr_acceptNoSignGPGCheckBox->setChecked(false);
|
||||
ui->fr_acceptNoSignGPGCheckBox->hide();
|
||||
ui->fr_signGPGCheckBox->setChecked(false);
|
||||
ui->fr_signGPGCheckBox->hide();
|
||||
}
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>760</width>
|
||||
<height>538</height>
|
||||
<width>1161</width>
|
||||
<height>1223</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
Loading…
Reference in New Issue
Block a user