Lots of little changes to libretroshare. Improvements mainly focused

on configuration storage and loading:
 * Improved Configuration Manager (almost finished)
 * Mutex protections for Configuration system
 * added Configuration storage to p3ConnectMgr.
 * added Configuration storage to p3MsgService.
 * bugfixes in p3GeneralConfig.
 * Added Config Save notification where necessary.
 * added safe FinalConfigSave before exit().
 * added RsPeerNetItem + RsPeerStunItem (serialiser)
 * reordered startup for correct config loading.
 * enabled Loading of certs in AuthXPGP.
 * move sockaddr_clear() to util/rsnet.h
 * switched p3MsgService sendMessage checking to pqiMonitor syste,.
 * corrected pqiarchive saving of PeerIds.
 * added setNetworkMode() & setVisState() to p3ConnectMgr.
 * added Mutex protection to p3ranking.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@336 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-02-07 16:18:34 +00:00
parent 2c69fd7eaf
commit 806b8285f2
36 changed files with 1712 additions and 599 deletions

View file

@ -26,6 +26,7 @@
#include "rsserver/p3face.h"
#include <sstream>
#include <sys/time.h>
#include <time.h>
@ -215,6 +216,23 @@ void RsServer::run()
/* Tick slow services */
mRanking->tick();
/* force saving test */
#if 0
std::string opt;
std::string val = "VALUE";
{
std::ostringstream out;
out << "SEC:" << lastSec;
opt = out.str();
}
mGeneralConfig->setSetting(opt, val);
#endif
mConfigMgr->tick(); /* saves stuff */
}
// every 60 loops (> 1 min)
@ -222,29 +240,14 @@ void RsServer::run()
{
loop = 0;
// save the config every 5 minutes.
if (min % 5 == 1)
{
//ConfigSave();
#ifdef PQI_USE_CHANNELS
/* hack to update for now
* Only occassionally - cos disabled
*/
// channel_list_ok = false;
// update_channels();
#endif
//std::cerr << "RsServer::run() UpdateAllFiles()" << std::endl;
//UpdateAllFiles();
}
/* force saving FileTransferStatus */
server->saveFileTransferStatus();
/* hour loop */
if (++min >= 60)
{
min = 0;
}
// update_dirlist();
}
// slow update tick as well.