From 0e6302ac6a3c0ac607c6dfaf5921865dff82d038 Mon Sep 17 00:00:00 2001 From: drbob Date: Sat, 29 Mar 2014 05:20:57 +0000 Subject: [PATCH] Removed configuration type (uint32) as its not needed or really used. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7212 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/dbase/cachestrapper.cc | 2 +- libretroshare/src/dht/p3bitdht.cc | 2 +- libretroshare/src/ft/ftcontroller.cc | 2 +- libretroshare/src/ft/ftdbase.cc | 2 +- libretroshare/src/ft/ftextralist.cc | 2 +- libretroshare/src/gxs/rsgxsnetservice.cc | 2 +- libretroshare/src/plugins/pluginmanager.cc | 10 +-- libretroshare/src/plugins/rscacheservice.h | 2 +- libretroshare/src/plugins/rspqiservice.h | 2 +- libretroshare/src/pqi/authgpg.cc | 12 ++-- libretroshare/src/pqi/authssl.cc | 2 +- libretroshare/src/pqi/p3cfgmgr.cc | 62 +++++++++---------- libretroshare/src/pqi/p3cfgmgr.h | 60 ++---------------- libretroshare/src/pqi/p3historymgr.cc | 2 +- libretroshare/src/pqi/p3peermgr.cc | 2 +- libretroshare/src/rsserver/rsinit.cc | 8 +-- libretroshare/src/services/p3chatservice.cc | 2 +- libretroshare/src/services/p3gxsreputation.cc | 2 +- libretroshare/src/services/p3msgservice.cc | 2 +- libretroshare/src/services/p3statusservice.cc | 2 +- libretroshare/src/turtle/p3turtle.cc | 2 +- 21 files changed, 66 insertions(+), 118 deletions(-) diff --git a/libretroshare/src/dbase/cachestrapper.cc b/libretroshare/src/dbase/cachestrapper.cc index c358016ab..255491b5c 100644 --- a/libretroshare/src/dbase/cachestrapper.cc +++ b/libretroshare/src/dbase/cachestrapper.cc @@ -620,7 +620,7 @@ void CacheStore::locked_storeCacheEntry(const RsCacheData &data) ********************************* CacheStrapper ********************************/ CacheStrapper::CacheStrapper(p3ServiceControl *sc, uint32_t ftServiceId) - :p3Config(CONFIG_TYPE_CACHE), mServiceCtrl(sc), mFtServiceId(ftServiceId), + :p3Config(), mServiceCtrl(sc), mFtServiceId(ftServiceId), csMtx("CacheStrapper") { return; diff --git a/libretroshare/src/dht/p3bitdht.cc b/libretroshare/src/dht/p3bitdht.cc index 56053e0d9..410dbb268 100644 --- a/libretroshare/src/dht/p3bitdht.cc +++ b/libretroshare/src/dht/p3bitdht.cc @@ -83,7 +83,7 @@ virtual int dhtInfoCallback(const bdId *id, uint32_t type, uint32_t flags, std:: p3BitDht::p3BitDht(const RsPeerId& id, pqiConnectCb *cb, p3NetMgr *nm, UdpStack *udpstack, std::string bootstrapfile) - :p3Config(CONFIG_TYPE_BITDHT), pqiNetAssistConnect(id, cb), mNetMgr(nm), dhtMtx("p3BitDht") + :p3Config(), pqiNetAssistConnect(id, cb), mNetMgr(nm), dhtMtx("p3BitDht") { mDhtStunner = NULL; mProxyStunner = NULL; diff --git a/libretroshare/src/ft/ftcontroller.cc b/libretroshare/src/ft/ftcontroller.cc index 6662fc3dd..2b8a34a74 100644 --- a/libretroshare/src/ft/ftcontroller.cc +++ b/libretroshare/src/ft/ftcontroller.cc @@ -99,7 +99,7 @@ ftFileControl::ftFileControl(std::string fname, } ftController::ftController(CacheStrapper *cs, ftDataMultiplex *dm, p3ServiceControl *sc, uint32_t ftServiceId) - :CacheTransfer(cs), p3Config(CONFIG_TYPE_FT_CONTROL), + :CacheTransfer(cs), p3Config(), last_save_time(0), last_clean_time(0), mDataplex(dm), diff --git a/libretroshare/src/ft/ftdbase.cc b/libretroshare/src/ft/ftdbase.cc index c08d15fd2..b8b3e5055 100644 --- a/libretroshare/src/ft/ftdbase.cc +++ b/libretroshare/src/ft/ftdbase.cc @@ -123,7 +123,7 @@ bool ftFiStore::search(const RsFileHash &hash, FileSearchFlags hintflags, FileIn ftFiMonitor::ftFiMonitor(CacheStrapper *cs,std::string cachedir, const RsPeerId& pid,const std::string& config_dir) - :FileIndexMonitor(cs,cachedir, pid,config_dir), p3Config(CONFIG_TYPE_FT_SHARED) + :FileIndexMonitor(cs,cachedir, pid,config_dir), p3Config() { return; } diff --git a/libretroshare/src/ft/ftextralist.cc b/libretroshare/src/ft/ftextralist.cc index 54c8720e0..73d4c2a72 100644 --- a/libretroshare/src/ft/ftextralist.cc +++ b/libretroshare/src/ft/ftextralist.cc @@ -41,7 +41,7 @@ *****/ ftExtraList::ftExtraList() - :p3Config(CONFIG_TYPE_FT_EXTRA_LIST), extMutex("p3Config") + :p3Config(), extMutex("p3Config") { return; } diff --git a/libretroshare/src/gxs/rsgxsnetservice.cc b/libretroshare/src/gxs/rsgxsnetservice.cc index c07cd6db9..539dcfbe5 100644 --- a/libretroshare/src/gxs/rsgxsnetservice.cc +++ b/libretroshare/src/gxs/rsgxsnetservice.cc @@ -44,7 +44,7 @@ RsGxsNetService::RsGxsNetService(uint16_t servType, RsGeneralDataService *gds, RsNxsNetMgr *netMgr, RsNxsObserver *nxsObs, const RsServiceInfo serviceInfo, RsGixsReputation* reputations, RsGcxs* circles, bool grpAutoSync) - : p3ThreadedService(), p3Config(servType), mTransactionN(0), + : p3ThreadedService(), p3Config(), mTransactionN(0), mObserver(nxsObs), mDataStore(gds), mServType(servType), mTransactionTimeOut(TRANSAC_TIMEOUT), mNetMgr(netMgr), mNxsMutex("RsGxsNetService"), mSyncTs(0), mSYNC_PERIOD(SYNC_PERIOD), mCircles(circles), mReputations(reputations), mGrpAutoSync(grpAutoSync), mGrpServerUpdateItem(NULL), diff --git a/libretroshare/src/plugins/pluginmanager.cc b/libretroshare/src/plugins/pluginmanager.cc index c1637746a..89fdc2200 100644 --- a/libretroshare/src/plugins/pluginmanager.cc +++ b/libretroshare/src/plugins/pluginmanager.cc @@ -41,7 +41,7 @@ typedef RsPlugin *(*RetroSharePluginEntry)(void) ; RsPluginHandler *rsPlugins ; RsPluginManager::RsPluginManager(const RsFileHash &hash) - : p3Config(CONFIG_TYPE_PLUGINS),_current_executable_hash(hash) + : p3Config(),_current_executable_hash(hash) { _allow_all_plugins = false ; } @@ -525,16 +525,16 @@ bool RsPluginManager::saveList(bool& cleanup, std::list& list) return true; } -RsCacheService::RsCacheService(uint16_t service_type,uint32_t config_type,uint32_t tick_delay, RsPluginHandler* pgHandler) +RsCacheService::RsCacheService(uint16_t service_type,uint32_t tick_delay, RsPluginHandler* pgHandler) : CacheSource(service_type, true, pgHandler->getFileServer()->getCacheStrapper(), pgHandler->getLocalCacheDir()), CacheStore (service_type, true, pgHandler->getFileServer()->getCacheStrapper(), pgHandler->getFileServer()->getCacheTransfer(), pgHandler->getRemoteCacheDir()), - p3Config(config_type), // CONFIG_TYPE_RANK_LINK + p3Config(), _tick_delay_in_seconds(tick_delay) { } -RsPQIService::RsPQIService(uint16_t service_type,uint32_t config_type,uint32_t /*tick_delay_in_seconds*/, RsPluginHandler* /*pgHandler*/) - : p3Service(),p3Config(config_type) +RsPQIService::RsPQIService(uint16_t service_type,uint32_t /*tick_delay_in_seconds*/, RsPluginHandler* /*pgHandler*/) + : p3Service(),p3Config() { } diff --git a/libretroshare/src/plugins/rscacheservice.h b/libretroshare/src/plugins/rscacheservice.h index e323a9260..033c608da 100644 --- a/libretroshare/src/plugins/rscacheservice.h +++ b/libretroshare/src/plugins/rscacheservice.h @@ -9,7 +9,7 @@ class RsCacheService: public CacheSource, public CacheStore, public p3Config { public: - RsCacheService(uint16_t type,uint32_t config_type,uint32_t tick_delay_in_seconds, RsPluginHandler* pgHandler) ; + RsCacheService(uint16_t type,uint32_t tick_delay_in_seconds, RsPluginHandler* pgHandler) ; uint32_t tickDelay() const { return _tick_delay_in_seconds ; } virtual void tick() {} diff --git a/libretroshare/src/plugins/rspqiservice.h b/libretroshare/src/plugins/rspqiservice.h index b92925538..c42331c8a 100644 --- a/libretroshare/src/plugins/rspqiservice.h +++ b/libretroshare/src/plugins/rspqiservice.h @@ -9,7 +9,7 @@ class RsPQIService: public p3Service, public p3Config { public: - RsPQIService(uint16_t type,uint32_t config_type,uint32_t tick_delay_in_seconds, RsPluginHandler* pgHandler) ; + RsPQIService(uint16_t type,uint32_t tick_delay_in_seconds, RsPluginHandler* pgHandler) ; uint32_t tickDelay() const { return _tick_delay_in_seconds ; } virtual int tick() = 0 ; diff --git a/libretroshare/src/pqi/authgpg.cc b/libretroshare/src/pqi/authgpg.cc index 9d1f200eb..0cb77c204 100644 --- a/libretroshare/src/pqi/authgpg.cc +++ b/libretroshare/src/pqi/authgpg.cc @@ -121,12 +121,12 @@ void AuthGPG::exit() } AuthGPG::AuthGPG(const std::string& path_to_public_keyring,const std::string& path_to_secret_keyring,const std::string& path_to_trustdb,const std::string& pgp_lock_file) - :p3Config(CONFIG_TYPE_AUTHGPG), - PGPHandler(path_to_public_keyring,path_to_secret_keyring,path_to_trustdb,pgp_lock_file), - gpgMtxService("AuthGPG-service"), - gpgMtxEngine("AuthGPG-engine"), - gpgMtxData("AuthGPG-data"), - gpgKeySelected(false) + :p3Config(), + PGPHandler(path_to_public_keyring,path_to_secret_keyring,path_to_trustdb,pgp_lock_file), + gpgMtxService("AuthGPG-service"), + gpgMtxEngine("AuthGPG-engine"), + gpgMtxData("AuthGPG-data"), + gpgKeySelected(false) { _force_sync_database = false ; start(); diff --git a/libretroshare/src/pqi/authssl.cc b/libretroshare/src/pqi/authssl.cc index 52eb4aacf..20cdbb375 100644 --- a/libretroshare/src/pqi/authssl.cc +++ b/libretroshare/src/pqi/authssl.cc @@ -276,7 +276,7 @@ sslcert::sslcert(X509 *x509, const RsPeerId& pid) AuthSSLimpl::AuthSSLimpl() - : p3Config(CONFIG_TYPE_AUTHSSL), sslctx(NULL), + : p3Config(), sslctx(NULL), mOwnCert(NULL), sslMtx("AuthSSL"), mOwnPrivateKey(NULL), mOwnPublicKey(NULL), init(0) { } diff --git a/libretroshare/src/pqi/p3cfgmgr.cc b/libretroshare/src/pqi/p3cfgmgr.cc index b0d0333d2..7eaf752ce 100644 --- a/libretroshare/src/pqi/p3cfgmgr.cc +++ b/libretroshare/src/pqi/p3cfgmgr.cc @@ -57,10 +57,10 @@ void p3ConfigMgr::tick() RsStackMutex stack(cfgMtx); /***** LOCK STACK MUTEX ****/ /* iterate through and check if any have changed */ - std::map::iterator it; - for(it = configs.begin(); it != configs.end(); it++) + std::list::iterator it; + for(it = mConfigs.begin(); it != mConfigs.end(); it++) { - if (it->second->HasConfigChanged(0)) + if ((*it)->HasConfigChanged(0)) { #ifdef CONFIG_DEBUG @@ -104,17 +104,17 @@ void p3ConfigMgr::saveConfig() RsStackMutex stack(cfgMtx); /***** LOCK STACK MUTEX ****/ - std::map::iterator it; - for(it = configs.begin(); it != configs.end(); it++) + std::list::iterator it; + for(it = mConfigs.begin(); it != mConfigs.end(); it++) { - if (it->second->HasConfigChanged(1)) + if ((*it)->HasConfigChanged(1)) { #ifdef CONFIG_DEBUG std::cerr << "p3ConfigMgr::globalSaveConfig() Saving Element: "; std::cerr << it->first; std::cerr << std::endl; #endif - ok &= it->second->saveConfiguration(); + ok &= (*it)->saveConfiguration(); } /* save metaconfig */ } @@ -131,9 +131,9 @@ void p3ConfigMgr::loadConfiguration() void p3ConfigMgr::loadConfig() { - std::map::iterator cit; - RsFileHash dummyHash ; - for (cit = configs.begin(); cit != configs.end(); cit++) + std::list::iterator cit; + RsFileHash dummyHash ; + for (cit = mConfigs.begin(); cit != mConfigs.end(); cit++) { #ifdef CONFIG_DEBUG std::cerr << "p3ConfigMgr::loadConfig() Element: "; @@ -141,11 +141,11 @@ void p3ConfigMgr::loadConfig() std::cerr << std::endl; #endif - cit->second->loadConfiguration(dummyHash); + (*cit)->loadConfiguration(dummyHash); /* force config to NOT CHANGED */ - cit->second->HasConfigChanged(0); - cit->second->HasConfigChanged(1); + (*cit)->HasConfigChanged(0); + (*cit)->HasConfigChanged(1); } return; @@ -165,16 +165,20 @@ void p3ConfigMgr::addConfiguration(std::string file, pqiConfig *conf) filename += "config/"; filename += file; - conf->setFilename(filename); - - std::map::iterator cit = configs.find(conf->Type()); - if (cit != configs.end()) + std::list::iterator cit = std::find(mConfigs.begin(),mConfigs.end(),conf); + if (cit != mConfigs.end()) { - std::cerr << "p3Config::addConfiguration() WARNING: type " << conf->Type(); - std::cerr << " with filename " << filename; - std::cerr << " already added with filename " << cit->second->Filename() << std::endl; + std::cerr << "p3Config::addConfiguration() Config already added"; + std::cerr << std::endl; + std::cerr << "\tOriginal filename " << (*cit)->Filename(); + std::cerr << std::endl; + std::cerr << "\tIgnoring new filename " << filename; + std::cerr << std::endl; + return; } - configs[conf->Type()] = conf; + + conf->setFilename(filename); + mConfigs.push_back(conf); } @@ -188,8 +192,8 @@ void p3ConfigMgr::completeConfiguration() -p3Config::p3Config(uint32_t t) - :pqiConfig(t) +p3Config::p3Config() + :pqiConfig() { return; } @@ -407,7 +411,7 @@ bool p3Config::saveConfig() /**************************** CONFIGURATION CLASSES ********************/ p3GeneralConfig::p3GeneralConfig() - :p3Config(CONFIG_TYPE_GENERAL) + :p3Config() { return; } @@ -544,8 +548,8 @@ bool p3GeneralConfig::loadList(std::list& load) * only the Indication and hash really need it */ -pqiConfig::pqiConfig(uint32_t t) - : cfgMtx("pqiConfig"), ConfInd(2), type(t) +pqiConfig::pqiConfig() + : cfgMtx("pqiConfig"), ConfInd(2) { return; } @@ -555,12 +559,6 @@ pqiConfig::~pqiConfig() return; } -uint32_t pqiConfig::Type() -{ - RsStackMutex stack(cfgMtx); /***** LOCK STACK MUTEX ****/ - return type; -} - const std::string& pqiConfig::Filename() { RsStackMutex stack(cfgMtx); /***** LOCK STACK MUTEX ****/ diff --git a/libretroshare/src/pqi/p3cfgmgr.h b/libretroshare/src/pqi/p3cfgmgr.h index c6febe5bd..e328652a6 100644 --- a/libretroshare/src/pqi/p3cfgmgr.h +++ b/libretroshare/src/pqi/p3cfgmgr.h @@ -30,6 +30,7 @@ #include #include +#include #include "pqi/pqi_base.h" #include "pqi/pqiindic.h" @@ -59,48 +60,9 @@ * *********************/ -const uint32_t CONFIG_TYPE_GENERAL = 0x0001; -const uint32_t CONFIG_TYPE_PEERS = 0x0002; -const uint32_t CONFIG_TYPE_FSERVER = 0x0003; -const uint32_t CONFIG_TYPE_MSGS = 0x0004; -const uint32_t CONFIG_TYPE_AUTHGPG = 0x0006; - -/* new FileTransfer */ -const uint32_t CONFIG_TYPE_FT_SHARED = 0x0007; -const uint32_t CONFIG_TYPE_FT_EXTRA_LIST= 0x0008; -const uint32_t CONFIG_TYPE_FT_CONTROL = 0x0009; -const uint32_t CONFIG_TYPE_FT_DWLQUEUE = 0x000A; - -const uint32_t CONFIG_TYPE_P3DISC = 0x000B; -const uint32_t CONFIG_TYPE_AUTHSSL = 0x000C; - -/* wish these ids where higher... - * may move when switch to v0.5 - */ -const uint32_t CONFIG_TYPE_CHAT = 0x0012; -const uint32_t CONFIG_TYPE_STATUS = 0x0013; -const uint32_t CONFIG_TYPE_PLUGINS = 0x0014; -const uint32_t CONFIG_TYPE_HISTORY = 0x0015; - -/// turtle router -const uint32_t CONFIG_TYPE_TURTLE = 0x0020; - -/// dht (relay stuff mainly) -const uint32_t CONFIG_TYPE_BITDHT = 0x0030; - -/* standard services */ -const uint32_t CONFIG_TYPE_QBLOG = 0x0101; -const uint32_t CONFIG_TYPE_FORUMS = 0x0102; -const uint32_t CONFIG_TYPE_CHANNELS = 0x0103; - -const uint32_t CONFIG_TYPE_GXS_REPUTATION = 0x0200; - - - /* CACHE ID Must be at the END so that other configurations * are loaded First (Cache Config --> Cache Loading) */ -const uint32_t CONFIG_TYPE_CACHE = 0xff01; class p3ConfigMgr; @@ -114,7 +76,7 @@ class p3ConfigMgr; class pqiConfig { public: - pqiConfig(uint32_t t); + pqiConfig(); virtual ~pqiConfig(); /** @@ -129,12 +91,6 @@ virtual bool loadConfiguration(RsFileHash &loadHash) = 0; */ virtual bool saveConfiguration() = 0; -/** - * The type of configuration, see ids where this class is declared - * @see p3cfgmgr.h - */ -uint32_t Type(); - /** * The name of the configuration file */ @@ -170,17 +126,13 @@ void setHash(const RsFileHash& h); Indicator ConfInd; - uint32_t type; std::string filename; RsFileHash hash; - friend class p3ConfigMgr; /* so it can access: * setFilename() and HasConfigChanged() */ - - }; @@ -244,12 +196,12 @@ class p3ConfigMgr */ void loadConfig(); -const std::string basedir; + const std::string basedir; RsMutex cfgMtx; /* below is protected */ -bool mConfigSaveActive; -std::map configs; + bool mConfigSaveActive; + std::list mConfigs; }; @@ -266,7 +218,7 @@ class p3Config: public pqiConfig { public: - p3Config(uint32_t t); + p3Config(); virtual bool loadConfiguration(RsFileHash &loadHash); virtual bool saveConfiguration(); diff --git a/libretroshare/src/pqi/p3historymgr.cc b/libretroshare/src/pqi/p3historymgr.cc index cbd623cfd..5705b736e 100644 --- a/libretroshare/src/pqi/p3historymgr.cc +++ b/libretroshare/src/pqi/p3historymgr.cc @@ -41,7 +41,7 @@ RsHistory *rsHistory = NULL; p3HistoryMgr::p3HistoryMgr() - : p3Config(CONFIG_TYPE_HISTORY), mHistoryMtx("p3HistoryMgr") + : p3Config(), mHistoryMtx("p3HistoryMgr") { nextMsgId = 1; diff --git a/libretroshare/src/pqi/p3peermgr.cc b/libretroshare/src/pqi/p3peermgr.cc index 8e8477076..3f4b3da74 100644 --- a/libretroshare/src/pqi/p3peermgr.cc +++ b/libretroshare/src/pqi/p3peermgr.cc @@ -109,7 +109,7 @@ std::string textPeerConnectState(peerState &state) p3PeerMgrIMPL::p3PeerMgrIMPL(const RsPeerId& ssl_own_id, const RsPgpId& gpg_own_id, const std::string& gpg_own_name, const std::string& ssl_own_location) - :p3Config(CONFIG_TYPE_PEERS), mPeerMtx("p3PeerMgr"), mStatusChanged(false) + :p3Config(), mPeerMtx("p3PeerMgr"), mStatusChanged(false) { { diff --git a/libretroshare/src/rsserver/rsinit.cc b/libretroshare/src/rsserver/rsinit.cc index dfe19c0b7..22a4b78b2 100644 --- a/libretroshare/src/rsserver/rsinit.cc +++ b/libretroshare/src/rsserver/rsinit.cc @@ -1630,7 +1630,6 @@ int RsServer::StartupRetroShare() mConfigMgr->addConfiguration("peers.cfg", mPeerMgr); mConfigMgr->addConfiguration("general.cfg", mGeneralConfig); - mConfigMgr->addConfiguration("cache.cfg", mCacheStrapper); mConfigMgr->addConfiguration("msgs.cfg", msgSrv); mConfigMgr->addConfiguration("chat.cfg", chatSrv); mConfigMgr->addConfiguration("p3History.cfg", mHistoryMgr); @@ -1645,7 +1644,6 @@ int RsServer::StartupRetroShare() #endif #ifdef RS_ENABLE_GXS - mConfigMgr->addConfiguration("identity.cfg", gxsid_ns); mConfigMgr->addConfiguration("gxsforums.cfg", gxsforums_ns); mConfigMgr->addConfiguration("gxschannels.cfg", gxschannels_ns); @@ -1654,7 +1652,6 @@ int RsServer::StartupRetroShare() mConfigMgr->addConfiguration("wire.cfg", wire_ns); mConfigMgr->addConfiguration("wiki.cfg", wiki_ns); mConfigMgr->addConfiguration("photo.cfg", photo_ns); - #endif mPluginsManager->addConfigurations(mConfigMgr) ; @@ -1666,13 +1663,14 @@ int RsServer::StartupRetroShare() /**************************************************************************/ std::cerr << "(2) Load configuration files" << std::endl; - mConfigMgr->loadConfiguration(); - /* NOTE: CacheStrapper's load causes Cache Files to be * loaded into all the CacheStores/Sources. This happens * after all the other configurations have happened. */ + mConfigMgr->addConfiguration("cache.cfg", mCacheStrapper); + mConfigMgr->loadConfiguration(); + /**************************************************************************/ /* trigger generalConfig loading for classes that require it */ /**************************************************************************/ diff --git a/libretroshare/src/services/p3chatservice.cc b/libretroshare/src/services/p3chatservice.cc index 253d31e32..c46a93a08 100644 --- a/libretroshare/src/services/p3chatservice.cc +++ b/libretroshare/src/services/p3chatservice.cc @@ -76,7 +76,7 @@ static const uint32_t MAX_MESSAGES_PER_SECONDS_NUMBER = 5 ; // max number o static const uint32_t MAX_MESSAGES_PER_SECONDS_PERIOD = 10 ; // duration window for max number of messages before messages get dropped. p3ChatService::p3ChatService(p3ServiceControl *sc, p3LinkMgr *lm, p3HistoryMgr *historyMgr) - :p3Service(), p3Config(CONFIG_TYPE_CHAT), mChatMtx("p3ChatService"), mServiceCtrl(sc), mLinkMgr(lm) , mHistoryMgr(historyMgr) + :p3Service(), p3Config(), mChatMtx("p3ChatService"), mServiceCtrl(sc), mLinkMgr(lm) , mHistoryMgr(historyMgr) { _serializer = new RsChatSerialiser() ; _own_avatar = NULL ; diff --git a/libretroshare/src/services/p3gxsreputation.cc b/libretroshare/src/services/p3gxsreputation.cc index e89aaa00f..ea7a61cd3 100644 --- a/libretroshare/src/services/p3gxsreputation.cc +++ b/libretroshare/src/services/p3gxsreputation.cc @@ -123,7 +123,7 @@ uint32_t ConvertToSerialised(int32_t value, bool limit) p3GxsReputation::p3GxsReputation(p3LinkMgr *lm) - :p3Service(), p3Config(CONFIG_TYPE_GXS_REPUTATION), + :p3Service(), p3Config(), mReputationMtx("p3GxsReputation"), mLinkMgr(lm) { addSerialType(new RsGxsReputationSerialiser()); diff --git a/libretroshare/src/services/p3msgservice.cc b/libretroshare/src/services/p3msgservice.cc index 2879902c6..212a34058 100644 --- a/libretroshare/src/services/p3msgservice.cc +++ b/libretroshare/src/services/p3msgservice.cc @@ -76,7 +76,7 @@ static const uint8_t ENCRYPTED_MSG_PROTOCOL_VERSION_01 = 0x37 ; p3MsgService::p3MsgService(p3ServiceControl *sc) - :p3Service(), p3Config(CONFIG_TYPE_MSGS), + :p3Service(), p3Config(), mServiceCtrl(sc), mMsgMtx("p3MsgService"), mMsgUniqueId(time(NULL)) { _serialiser = new RsMsgSerialiser(); diff --git a/libretroshare/src/services/p3statusservice.cc b/libretroshare/src/services/p3statusservice.cc index 1d1acb9d3..15dd8d381 100644 --- a/libretroshare/src/services/p3statusservice.cc +++ b/libretroshare/src/services/p3statusservice.cc @@ -48,7 +48,7 @@ std::ostream& operator<<(std::ostream& out, const StatusInfo& si) RsStatus *rsStatus = NULL; p3StatusService::p3StatusService(p3ServiceControl *sc) - :p3Service(), p3Config(CONFIG_TYPE_STATUS), mServiceCtrl(sc), mStatusMtx("p3StatusService") + :p3Service(), p3Config(), mServiceCtrl(sc), mStatusMtx("p3StatusService") { addSerialType(new RsStatusSerialiser()); diff --git a/libretroshare/src/turtle/p3turtle.cc b/libretroshare/src/turtle/p3turtle.cc index f5d734116..2e1342ff4 100644 --- a/libretroshare/src/turtle/p3turtle.cc +++ b/libretroshare/src/turtle/p3turtle.cc @@ -99,7 +99,7 @@ static const int MAX_TR_FORWARD_PER_SEC_LOWER_LIMIT = 10 ; static const int DISTANCE_SQUEEZING_POWER = 8 ; p3turtle::p3turtle(p3LinkMgr *lm) - :p3Service(), p3Config(CONFIG_TYPE_TURTLE), mLinkMgr(lm), mTurtleMtx("p3turtle") + :p3Service(), p3Config(), mLinkMgr(lm), mTurtleMtx("p3turtle") { RsStackMutex stack(mTurtleMtx); /********** STACK LOCKED MTX ******/