mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-19 06:20:44 -04:00
- Removed RsIface, and moved configuration options to RsServerConfig (rsconfig.h)
- Fixed cipher list to "HIGH:!DSS:!aNULL:!3DES", which should disable the weak ones, no idea how to force it to PFS (which it should use). - fixed void * pointer maths. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6584 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ebbf6d9e26
commit
f93ed1fb6e
12 changed files with 61 additions and 312 deletions
|
@ -66,68 +66,6 @@ int RsServer::ConfigSetBootPrompt( bool /*on*/ )
|
|||
return 1;
|
||||
}
|
||||
|
||||
|
||||
int RsServer::UpdateAllConfig()
|
||||
{
|
||||
/* fill the rsiface class */
|
||||
RsIface &iface = getIface();
|
||||
|
||||
/* lock Mutexes */
|
||||
lockRsCore(); /* LOCK */
|
||||
iface.lockData(); /* LOCK */
|
||||
|
||||
RsConfig &config = iface.mConfig;
|
||||
|
||||
config.ownId = AuthSSL::getAuthSSL()->OwnId();
|
||||
config.ownName = AuthGPG::getAuthGPG()->getGPGOwnName();
|
||||
peerState pstate;
|
||||
mPeerMgr->getOwnNetStatus(pstate);
|
||||
|
||||
/* ports */
|
||||
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.serveraddr.sin_addr);
|
||||
config.extPort = ntohs(pstate.serveraddr.sin_port);
|
||||
config.promptAtBoot = true; /* popup the password prompt */
|
||||
|
||||
/* update network configuration */
|
||||
|
||||
pqiNetStatus status;
|
||||
mNetMgr->getNetStatus(status);
|
||||
|
||||
config.netLocalOk = status.mLocalAddrOk;
|
||||
config.netUpnpOk = status.mUpnpOk;
|
||||
config.netStunOk = false;
|
||||
config.netExtraAddressOk = status.mExtAddrOk;
|
||||
|
||||
config.netDhtOk = status.mDhtOk;
|
||||
config.netDhtNetSize = status.mDhtNetworkSize;
|
||||
config.netDhtRsNetSize = status.mDhtRsNetworkSize;
|
||||
|
||||
/* update DHT/UPnP config */
|
||||
|
||||
config.uPnPState = mNetMgr->getUPnPState();
|
||||
config.uPnPActive = mNetMgr->getUPnPEnabled();
|
||||
config.DHTPeers = 20;
|
||||
config.DHTActive = mNetMgr->getDHTEnabled();
|
||||
|
||||
/* Notify of Changes */
|
||||
// iface.setChanged(RsIface::Config);
|
||||
rsicontrol->getNotify().notifyListChange(NOTIFY_LIST_CONFIG, NOTIFY_TYPE_MOD);
|
||||
|
||||
/* unlock Mutexes */
|
||||
iface.unlockData(); /* UNLOCK */
|
||||
unlockRsCore(); /* UNLOCK */
|
||||
|
||||
return 1;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void RsServer::ConfigFinalSave()
|
||||
{
|
||||
/* force saving of transfers TODO */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue