Reworked ranking process flow

added ranking retrieval in gui 
removed locks from TokenQueue
refactored gxs p3 pointers in p3face header file 
and gxs services now shutdown correctly using join(led to bad segfaults on shutdown)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5972 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2012-12-11 22:26:11 +00:00
parent f8c83779af
commit 3eaf844ec8
13 changed files with 297 additions and 92 deletions

View file

@ -186,9 +186,21 @@ void RsServer::rsGlobalShutDown()
mPluginsManager->stopPlugins();
// stop the p3distrib threads
mForums->join();
mChannels->join();
if(mGxsCircles) mGxsCircles->join();
if(mGxsForums) mGxsForums->join();
if(mGxsIdService) mGxsIdService->join();
if(mPosted) mPosted->join();
if(mPhoto) mPhoto->join();
if(mWiki) mWiki->join();
if(mWire) mWire->join();
#ifdef RS_USE_BLOGS
mBlogs->join();
#endif

View file

@ -76,6 +76,15 @@ RsServer::RsServer(RsIface &i, NotifyBase &callback)
/* Config */
mConfigMgr = NULL;
mGeneralConfig = NULL;
/* GXS */
mPhoto = NULL;
mWiki = NULL;
mPosted = NULL;
mGxsCircles = NULL;
mGxsIdService = NULL;
mGxsForums = NULL;
mWire = NULL;
}
RsServer::~RsServer()

View file

@ -45,6 +45,15 @@
#include "services/p3channels.h"
#include "services/p3forums.h"
#include "services/p3idservice.h"
#include "services/p3gxscircles.h"
#include "services/p3wiki.h"
#include "services/p3posted.h"
#include "services/p3photoservice.h"
#include "services/p3gxsforums.h"
#include "services/p3wire.h"
class p3PeerMgrIMPL;
class p3LinkMgrIMPL;
class p3NetMgrIMPL;
@ -175,6 +184,16 @@ class RsServer: public RsControl, public RsThread
p3Forums *mForums;
/* caches (that need ticking) */
/* GXS */
p3Wiki *mWiki;
p3Posted *mPosted;
p3PhotoService *mPhoto;
p3GxsCircles *mGxsCircles;
p3IdService *mGxsIdService;
p3GxsForums *mGxsForums;
p3Wire *mWire;
/* Config */
p3ConfigMgr *mConfigMgr;
p3GeneralConfig *mGeneralConfig;

View file

@ -1823,15 +1823,6 @@ RsTurtle *rsTurtle = NULL ;
#include "gxs/rsgxsflags.h"
#endif
#ifdef ENABLE_GXS_SERVICES
#include "services/p3idservice.h"
#include "services/p3gxscircles.h"
#include "services/p3wiki.h"
#include "services/p3posted.h"
#include "services/p3photoservice.h"
#include "services/p3gxsforums.h"
#include "services/p3wire.h"
#endif
#ifndef PQI_DISABLE_TUNNEL
#include "services/p3tunnel.h"
@ -2302,8 +2293,6 @@ int RsServer::StartupRetroShare()
/**** Identity service ****/
p3IdService *mGxsIdService = NULL;
RsGeneralDataService* gxsid_ds = new RsDataService(currGxsDir + "/", "gxsid_db",
RS_SERVICE_GXSV1_TYPE_GXSID, NULL);
@ -2318,7 +2307,6 @@ int RsServer::StartupRetroShare()
/**** GxsCircle service ****/
p3GxsCircles *mGxsCircles = NULL;
RsGeneralDataService* gxscircles_ds = new RsDataService(currGxsDir + "/", "gxscircles_db",
RS_SERVICE_GXSV1_TYPE_GXSCIRCLE, NULL);
@ -2354,8 +2342,6 @@ int RsServer::StartupRetroShare()
RsGenExchange::setAuthenPolicyFlag(flag, photoAuthenPolicy,
RsGenExchange::GRP_OPTION_BITS);
p3PhotoService *mPhoto = NULL;
RsGeneralDataService* photo_ds = new RsDataService(currGxsDir + "/", "photoV2_db",
RS_SERVICE_GXSV1_TYPE_PHOTO, NULL);
@ -2372,7 +2358,7 @@ int RsServer::StartupRetroShare()
/**** Posted GXS service ****/
p3Posted *mPosted = NULL;
RsGeneralDataService* posted_ds = new RsDataService(currGxsDir + "/", "posted_db",
RS_SERVICE_GXSV1_TYPE_POSTED);
@ -2388,7 +2374,7 @@ int RsServer::StartupRetroShare()
/**** Wiki GXS service ****/
p3Wiki *mWiki = NULL;
RsGeneralDataService* wiki_ds = new RsDataService(currGxsDir + "/", "wiki_db",
RS_SERVICE_GXSV1_TYPE_WIKI);
@ -2404,7 +2390,6 @@ int RsServer::StartupRetroShare()
/**** Wire GXS service ****/
p3Wire *mWire = NULL;
RsGeneralDataService* wire_ds = new RsDataService(currGxsDir + "/", "wire_db",
RS_SERVICE_GXSV1_TYPE_WIRE);
@ -2420,8 +2405,6 @@ int RsServer::StartupRetroShare()
/**** Forum GXS service ****/
p3GxsForums *mGxsForums = NULL;
RsGeneralDataService* gxsforums_ds = new RsDataService(currGxsDir + "/", "gxsforums_db",
RS_SERVICE_GXSV1_TYPE_FORUMS);