mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
add address list to gui
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1812 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d2f9f1c4f1
commit
e0543329ad
@ -3850,5 +3850,4 @@ void peerConnectState::printIpAddressList(std::list<IpAddressTimed> ipTimedList)
|
||||
std::cerr << " seenTime : " << ipListIt->seenTime << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -97,6 +97,7 @@ class RsPeerDetails
|
||||
uint16_t localPort;
|
||||
std::string extAddr;
|
||||
uint16_t extPort;
|
||||
std::list<std::string> ipAddressList;
|
||||
|
||||
uint32_t netMode;
|
||||
uint32_t tryNetMode; /* only for ownState */
|
||||
|
@ -368,6 +368,15 @@ bool p3Peers::getPeerDetails(std::string id, RsPeerDetails &d)
|
||||
d.extPort = ntohs(best_servr_addr.sin_port);
|
||||
d.lastConnect = pcs.lastcontact;
|
||||
d.connectPeriod = 0;
|
||||
std::list<std::string> ipAddressList;
|
||||
std::list<IpAddressTimed> pcsList = pcs.getIpAddressList();
|
||||
for (std::list<IpAddressTimed>::iterator ipListIt = pcsList.begin(); ipListIt!=(pcsList.end()); ipListIt++) {
|
||||
std::ostringstream toto;
|
||||
toto << ntohs(ipListIt->ipAddr.sin_port);
|
||||
ipAddressList.push_back(std::string(inet_ntoa(ipListIt->ipAddr.sin_addr)) + ":" + toto.str());
|
||||
}
|
||||
d.ipAddressList = ipAddressList;
|
||||
|
||||
|
||||
/* Translate */
|
||||
|
||||
|
@ -126,6 +126,10 @@ void ConfCertDialog::loadDialog()
|
||||
ui.extAddress->setText(QString::fromStdString(detail.extAddr));
|
||||
ui.extPort -> setValue(detail.extPort);
|
||||
|
||||
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));
|
||||
|
||||
/* set the url for DNS access (OLD) */
|
||||
//ui.extName->setText(QString::fromStdString(""));
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>493</width>
|
||||
<height>428</height>
|
||||
<height>513</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -706,6 +706,16 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Addresses list</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListWidget" name="ipAddressList"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
@ -857,7 +867,6 @@
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../images.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
Loading…
Reference in New Issue
Block a user