mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-19 06:20:44 -04:00
Removed p3ConnectMgr. Replaced it with p3LinkMgr, p3NetMgr and p3PeerMgr.
Updated references in other classes. * Most classes need p3LinkMgr, and only use two functions: OwnId() and getOnlineList() git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4416 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
21487bfdf6
commit
f6f721a492
55 changed files with 1226 additions and 1044 deletions
|
@ -38,6 +38,9 @@ const int p3facemsgzone = 11453;
|
|||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "pqi/p3peermgr.h"
|
||||
#include "pqi/p3netmgr.h"
|
||||
|
||||
|
||||
/****************************************/
|
||||
/* RsIface Config */
|
||||
|
@ -106,18 +109,18 @@ int RsServer::UpdateAllConfig()
|
|||
|
||||
config.ownId = AuthSSL::getAuthSSL()->OwnId();
|
||||
config.ownName = AuthGPG::getAuthGPG()->getGPGOwnName();
|
||||
peerConnectState pstate;
|
||||
mConnMgr->getOwnNetStatus(pstate);
|
||||
peerState pstate;
|
||||
mPeerMgr->getOwnNetStatus(pstate);
|
||||
|
||||
/* ports */
|
||||
config.localAddr = rs_inet_ntoa(pstate.currentlocaladdr.sin_addr);
|
||||
config.localPort = ntohs(pstate.currentlocaladdr.sin_port);
|
||||
config.localAddr = rs_inet_ntoa(pstate.localaddr.sin_addr);
|
||||
config.localPort = ntohs(pstate.localaddr.sin_port);
|
||||
|
||||
config.firewalled = true;
|
||||
config.forwardPort = true;
|
||||
|
||||
config.extAddr = rs_inet_ntoa(pstate.currentserveraddr.sin_addr);
|
||||
config.extPort = ntohs(pstate.currentserveraddr.sin_port);
|
||||
config.extAddr = rs_inet_ntoa(pstate.serveraddr.sin_addr);
|
||||
config.extPort = ntohs(pstate.serveraddr.sin_port);
|
||||
|
||||
/* data rates */
|
||||
config.maxDownloadDataRate = (int) pqih -> getMaxRate(true); /* kb */
|
||||
|
@ -128,7 +131,7 @@ int RsServer::UpdateAllConfig()
|
|||
/* update network configuration */
|
||||
|
||||
pqiNetStatus status;
|
||||
mConnMgr->getNetStatus(status);
|
||||
mNetMgr->getNetStatus(status);
|
||||
|
||||
config.netLocalOk = status.mLocalAddrOk;
|
||||
config.netUpnpOk = status.mUpnpOk;
|
||||
|
@ -141,10 +144,10 @@ int RsServer::UpdateAllConfig()
|
|||
|
||||
/* update DHT/UPnP config */
|
||||
|
||||
config.uPnPState = mConnMgr->getUPnPState();
|
||||
config.uPnPActive = mConnMgr->getUPnPEnabled();
|
||||
config.uPnPState = mNetMgr->getUPnPState();
|
||||
config.uPnPActive = mNetMgr->getUPnPEnabled();
|
||||
config.DHTPeers = 20;
|
||||
config.DHTActive = mConnMgr->getDHTEnabled();
|
||||
config.DHTActive = mNetMgr->getDHTEnabled();
|
||||
|
||||
/* Notify of Changes */
|
||||
// iface.setChanged(RsIface::Config);
|
||||
|
@ -175,7 +178,7 @@ void RsServer::rsGlobalShutDown()
|
|||
// TODO: cache should also clean up old files
|
||||
|
||||
ConfigFinalSave(); // save configuration before exit
|
||||
mConnMgr->shutdown(); /* Handles UPnP */
|
||||
mNetMgr->shutdown(); /* Handles UPnP */
|
||||
|
||||
join();
|
||||
ftserver->StopThreads();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue