From 6b87c389511c465539ecfdbf09a24f8e529782ce Mon Sep 17 00:00:00 2001 From: sehraf Date: Mon, 14 Sep 2015 14:56:14 +0200 Subject: [PATCH] small fixes --- libretroshare/src/pqi/p3peermgr.cc | 9 ++++----- libretroshare/src/pqi/p3peermgr.h | 2 +- retroshare-gui/src/gui/settings/ServerPage.cpp | 16 ++++++++-------- retroshare-gui/src/gui/settings/ServerPage.ui | 2 +- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/libretroshare/src/pqi/p3peermgr.cc b/libretroshare/src/pqi/p3peermgr.cc index 3f7e58ff6..02e21c2ee 100644 --- a/libretroshare/src/pqi/p3peermgr.cc +++ b/libretroshare/src/pqi/p3peermgr.cc @@ -566,14 +566,14 @@ bool p3PeerMgrIMPL::setProxyServerAddress(const uint32_t type, const struct sock switch (type) { case RS_HIDDEN_TYPE_I2P: - if (!sockaddr_storage_same(mProxyServerAddressI2P,proxy_addr)) + if (!sockaddr_storage_same(mProxyServerAddressI2P, proxy_addr)) { IndicateConfigChanged(); /**** INDICATE MSG CONFIG CHANGED! *****/ mProxyServerAddressI2P = proxy_addr; } break; case RS_HIDDEN_TYPE_TOR: - if (!sockaddr_storage_same(mProxyServerAddressTor,proxy_addr)) + if (!sockaddr_storage_same(mProxyServerAddressTor, proxy_addr)) { IndicateConfigChanged(); /**** INDICATE MSG CONFIG CHANGED! *****/ mProxyServerAddressTor = proxy_addr; @@ -1938,7 +1938,7 @@ bool p3PeerMgrIMPL::saveList(bool &cleanup, std::list& saveData) // I2P #ifdef PEER_DEBUG - std::cerr << "Saving proxyServerAddress for I2P: " << sockaddr_storage_tostring(proxy_addr_tor); + std::cerr << "Saving proxyServerAddress for I2P: " << sockaddr_storage_tostring(proxy_addr_i2p); std::cerr << std::endl; #endif @@ -1986,7 +1986,7 @@ bool p3PeerMgrIMPL::loadList(std::list& load) std::string proxyIpAddressTor = kConfigDefaultProxyServerIpAddr; uint16_t proxyPortTor = kConfigDefaultProxyServerPort; std::string proxyIpAddressI2P = kConfigDefaultProxyServerIpAddr; - uint16_t proxyPortI2P = kConfigDefaultProxyServerPort; + uint16_t proxyPortI2P = kConfigDefaultProxyServerPort + 1; if (load.empty()) { std::cerr << "p3PeerMgrIMPL::loadList() list is empty, it may be a configuration problem." << std::endl; @@ -2108,7 +2108,6 @@ bool p3PeerMgrIMPL::loadList(std::list& load) std::cerr << "Loaded proxyIpAddress for I2P: " << proxyIpAddressI2P; std::cerr << std::endl ; #endif - } else if (kit->key == kConfigKeyProxyServerPortI2P) { diff --git a/libretroshare/src/pqi/p3peermgr.h b/libretroshare/src/pqi/p3peermgr.h index a6150863c..6880dd623 100644 --- a/libretroshare/src/pqi/p3peermgr.h +++ b/libretroshare/src/pqi/p3peermgr.h @@ -90,7 +90,7 @@ class peerState bool hiddenNode; /* all IP addresses / dyndns must be blank */ std::string hiddenDomain; uint16_t hiddenPort; - uint32_t hiddenType; + uint32_t hiddenType; std::string location; std::string name; diff --git a/retroshare-gui/src/gui/settings/ServerPage.cpp b/retroshare-gui/src/gui/settings/ServerPage.cpp index 3ee684b59..05d31008d 100755 --- a/retroshare-gui/src/gui/settings/ServerPage.cpp +++ b/retroshare-gui/src/gui/settings/ServerPage.cpp @@ -813,7 +813,7 @@ void ServerPage::saveAddresses() rsConfig->SetMaxDataRates( ui.totalDownloadRate->value(), ui.totalUploadRate->value() ); // HANDLE PROXY SERVER. - std::string orig_proxyaddr,new_proxyaddr; + std::string orig_proxyaddr, new_proxyaddr; uint16_t orig_proxyport, new_proxyport; uint32_t status ; // Tor @@ -1151,7 +1151,7 @@ void ServerPage::updateOutProxyIndicator() else { ui.iconlabel_i2p_outgoing->setPixmap(QPixmap(ICON_STATUS_UNKNOWN)) ; - ui.iconlabel_i2p_outgoing->setToolTip(tr("Tor proxy is not enabled")) ; + ui.iconlabel_i2p_outgoing->setToolTip(tr("I2P proxy is not enabled")) ; } } @@ -1181,11 +1181,11 @@ void ServerPage::updateInProxyIndicator() } proxy.setCapabilities(QNetworkProxy::HostNameLookupCapability | proxy.capabilities()) ; - //ui.iconlabel_tor_incoming->setPixmap(QPixmap(ICON_STATUS_UNKNOWN)) ; - //ui.testIncomingTor_PB->setIcon(QIcon(":/loader/circleball-16.gif")) ; - QMovie *movie = new QMovie(":/images/loader/circleball-16.gif"); - ui.iconlabel_service_incoming->setMovie(movie); - movie->start() ; + //ui.iconlabel_tor_incoming->setPixmap(QPixmap(ICON_STATUS_UNKNOWN)) ; + //ui.testIncomingTor_PB->setIcon(QIcon(":/loader/circleball-16.gif")) ; + QMovie *movie = new QMovie(":/images/loader/circleball-16.gif"); + ui.iconlabel_service_incoming->setMovie(movie); + movie->start() ; QNetworkProxy::setApplicationProxy(proxy) ; @@ -1217,7 +1217,7 @@ void ServerPage::handleNetworkReply(QNetworkReply *reply) //ui.testIncomingTor_PB->setIcon(QIcon(ICON_STATUS_UNKNOWN)) ; ui.iconlabel_service_incoming->setPixmap(QPixmap(ICON_STATUS_UNKNOWN)) ; - ui.iconlabel_service_incoming->setToolTip(tr("The proxy is not enabled or broken.\Are all services up and running fine??\nAlso check your ports!")) ; + ui.iconlabel_service_incoming->setToolTip(tr("The proxy is not enabled or broken.\nAre all services up and running fine??\nAlso check your ports!")) ; } reply->close(); diff --git a/retroshare-gui/src/gui/settings/ServerPage.ui b/retroshare-gui/src/gui/settings/ServerPage.ui index eb9ce5afb..76d32e0c9 100755 --- a/retroshare-gui/src/gui/settings/ServerPage.ui +++ b/retroshare-gui/src/gui/settings/ServerPage.ui @@ -1087,7 +1087,7 @@ Once this is done, paste the Onion/I2P (Base32) Address in the box above. This is your external address on the Tor/I2P network. Finally make sure that the Ports match the configuration. -If you have issues connecting over Tor check the Tor logs, too. +If you have issues connecting over Tor check the Tor logs too.