diff --git a/libretroshare/src/pqi/pqinetwork.cc b/libretroshare/src/pqi/pqinetwork.cc index e2f9a7207..f83c1e1ca 100644 --- a/libretroshare/src/pqi/pqinetwork.cc +++ b/libretroshare/src/pqi/pqinetwork.cc @@ -352,6 +352,8 @@ std::list getLocalInterfaces() addrs.push_back(inet_ntoa(addr)); } + free (iptable); + return addrs; } diff --git a/libretroshare/src/tcponudp/extaddrfinder.cc b/libretroshare/src/tcponudp/extaddrfinder.cc index a2146cd55..d1b9d2502 100644 --- a/libretroshare/src/tcponudp/extaddrfinder.cc +++ b/libretroshare/src/tcponudp/extaddrfinder.cc @@ -267,7 +267,7 @@ ExtAddrFinder::~ExtAddrFinder() delete _found ; delete _searching ; - delete _addr ; + free (_addr) ; } ExtAddrFinder::ExtAddrFinder() diff --git a/retroshare-gui/src/gui/feeds/PeerItem.cpp b/retroshare-gui/src/gui/feeds/PeerItem.cpp index 296c35986..bb958b694 100644 --- a/retroshare-gui/src/gui/feeds/PeerItem.cpp +++ b/retroshare-gui/src/gui/feeds/PeerItem.cpp @@ -22,6 +22,7 @@ #include "PeerItem.h" #include "FeedHolder.h" +#include "../RsAutoUpdatePage.h" #include "rsiface/rspeers.h" @@ -146,56 +147,58 @@ void PeerItem::updateItem() std::cerr << "PeerItem::updateItem()"; std::cerr << std::endl; #endif - RsPeerDetails details; - if (!rsPeers->getPeerDetails(mPeerId, details)) - { - return; - } + if(!RsAutoUpdatePage::eventsLocked()) { + RsPeerDetails details; + if (!rsPeers->getPeerDetails(mPeerId, details)) + { + return; + } - /* top Level info */ - QString status = QString::fromStdString(RsPeerStateString(details.state)); + /* top Level info */ + QString status = QString::fromStdString(RsPeerStateString(details.state)); #if 0 - /* Append additional status info from status service */ - StatusInfo statusInfo; - if ((rsStatus) && (rsStatus->getStatus(*it, statusInfo))) - { - status.append(QString::fromStdString("/" + RsStatusString(statusInfo.status))); - } + /* Append additional status info from status service */ + StatusInfo statusInfo; + if ((rsStatus) && (rsStatus->getStatus(*it, statusInfo))) + { + status.append(QString::fromStdString("/" + RsStatusString(statusInfo.status))); + } #endif - statusLabel->setText(status); - trustLabel->setText(QString::fromStdString( - RsPeerTrustString(details.trustLvl))); + statusLabel->setText(status); + trustLabel->setText(QString::fromStdString( + RsPeerTrustString(details.trustLvl))); - { - std::ostringstream out; - out << details.localAddr << ":"; - out << details.localPort << "/"; - out << details.extAddr << ":"; - out << details.extPort; - ipLabel->setText(QString::fromStdString(out.str())); + { + std::ostringstream out; + out << details.localAddr << ":"; + out << details.localPort << "/"; + out << details.extAddr << ":"; + out << details.extPort; + ipLabel->setText(QString::fromStdString(out.str())); + } + + connLabel->setText(QString::fromStdString(details.autoconnect)); + QDateTime date = QDateTime::fromTime_t(details.lastConnect); + QString stime = date.toString(Qt::LocalDate); + lastLabel-> setText(stime); + + /* do buttons */ + chatButton->setEnabled(details.state & RS_PEER_STATE_CONNECTED); + if (details.state & RS_PEER_STATE_FRIEND) + { + addButton->setEnabled(false); + removeButton->setEnabled(true); + msgButton->setEnabled(true); + } + else + { + addButton->setEnabled(true); + removeButton->setEnabled(false); + msgButton->setEnabled(false); + } } - connLabel->setText(QString::fromStdString(details.autoconnect)); - QDateTime date = QDateTime::fromTime_t(details.lastConnect); - QString stime = date.toString(Qt::LocalDate); - lastLabel-> setText(stime); - - /* do buttons */ - chatButton->setEnabled(details.state & RS_PEER_STATE_CONNECTED); - if (details.state & RS_PEER_STATE_FRIEND) - { - addButton->setEnabled(false); - removeButton->setEnabled(true); - msgButton->setEnabled(true); - } - else - { - addButton->setEnabled(true); - removeButton->setEnabled(false); - msgButton->setEnabled(false); - } - /* slow Tick */ int msec_rate = 10129; diff --git a/retroshare-gui/src/main.cpp b/retroshare-gui/src/main.cpp index da331208c..aef079eb1 100644 --- a/retroshare-gui/src/main.cpp +++ b/retroshare-gui/src/main.cpp @@ -168,13 +168,15 @@ int main(int argc, char *argv[]) QObject::connect(w->peersDialog,SIGNAL(friendsUpdated()),w->networkDialog,SLOT(insertConnect())) ; QObject::connect(w->peersDialog,SIGNAL(notifyGroupChat(const QString&,const QString&)),w,SLOT(displaySystrayMsg(const QString&,const QString&)),Qt::QueuedConnection) ; - /* only show window, if not startMinimized */ - RshareSettings *_settings = new RshareSettings(); - - if(!_settings->value(QString::fromUtf8("StartMinimized"), false).toBool()) { + /* only show window, if not startMinimized */ + RshareSettings _settings; - w->show(); + if(!_settings.value(QString::fromUtf8("StartMinimized"), false).toBool()) + { + + w->show(); + } } /* Startup a Timer to keep the gui's updated */