mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-14 20:12:29 -04:00
Significant improvements to DHT behaviour, and reconnection attempts.
* Added GUI interface for auto connect state. * Added HTTP retrieval and storage of DHT peers update. * Added code for partial recv() from DHT peers. * Disabled Chat/Disc/Udplayer/tcpstream debug output. * Added Unreachable Check to connMgr. * Added auto reconnect functions to connMgr (#define to disable). * Restructured DHT notify code... much cleaner. * DHT now flags out of date DHT results. * DHT notifies ConnMgr on any results (same or diff). * Added Fns to cleanup old udp connection. * other bugfixes. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@369 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
7b3fc2976e
commit
63828f77a8
20 changed files with 708 additions and 203 deletions
|
@ -164,6 +164,8 @@ void PeersDialog::insertPeers()
|
|||
QTreeWidget *peerWidget = ui.peertreeWidget;
|
||||
QTreeWidgetItem *oldSelect = getCurrentPeer();
|
||||
QTreeWidgetItem *newSelect = NULL;
|
||||
time_t now = time(NULL);
|
||||
|
||||
std::string oldId;
|
||||
if (oldSelect)
|
||||
{
|
||||
|
@ -200,7 +202,7 @@ void PeersDialog::insertPeers()
|
|||
item -> setText(2, QString::fromStdString(detail.name));
|
||||
|
||||
/* (2) Auto Connect */
|
||||
item -> setText(3, QString::fromStdString("Yes"));
|
||||
item -> setText(3, QString::fromStdString(detail.autoconnect));
|
||||
|
||||
/* (3) Trust Level */
|
||||
item -> setText(4,QString::fromStdString(
|
||||
|
@ -219,7 +221,7 @@ void PeersDialog::insertPeers()
|
|||
/* less important ones */
|
||||
/* () Last Contact */
|
||||
item -> setText(6,QString::fromStdString(
|
||||
RsPeerLastConnectString(detail.lastConnect)));
|
||||
RsPeerLastConnectString(now - detail.lastConnect)));
|
||||
|
||||
/* () Org */
|
||||
item -> setText(7, QString::fromStdString(detail.org));
|
||||
|
@ -271,7 +273,7 @@ void PeersDialog::insertPeers()
|
|||
}
|
||||
else
|
||||
{
|
||||
if (detail.lastConnect < 10000)
|
||||
if (now - detail.lastConnect < 3600)
|
||||
{
|
||||
for(i = 1; i < 12; i++)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue