mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-11 15:39:36 -05:00
added compilation flag for GXS dist sync
This commit is contained in:
parent
3c9af3d2e7
commit
38b39caf13
@ -569,7 +569,7 @@ void RsGxsNetService::syncWithPeers()
|
|||||||
std::set<RsPeerId> peers;
|
std::set<RsPeerId> peers;
|
||||||
mNetMgr->getOnlineList(mServiceInfo.mServiceType, peers);
|
mNetMgr->getOnlineList(mServiceInfo.mServiceType, peers);
|
||||||
|
|
||||||
if(mAllowDistSync)
|
if(mAllowDistSync && mGxsNetTunnel != NULL)
|
||||||
{
|
{
|
||||||
// Grab all online virtual peers of distant tunnels for the current service.
|
// Grab all online virtual peers of distant tunnels for the current service.
|
||||||
|
|
||||||
@ -740,7 +740,7 @@ void RsGxsNetService::generic_sendItem(RsNxsItem *si)
|
|||||||
{
|
{
|
||||||
// check if the item is to be sent to a distant peer or not
|
// check if the item is to be sent to a distant peer or not
|
||||||
|
|
||||||
if(mAllowDistSync && mGxsNetTunnel->isDistantPeer( static_cast<RsGxsNetTunnelVirtualPeerId>(si->PeerId())))
|
if(mAllowDistSync && mGxsNetTunnel != NULL && mGxsNetTunnel->isDistantPeer( static_cast<RsGxsNetTunnelVirtualPeerId>(si->PeerId())))
|
||||||
{
|
{
|
||||||
RsNxsSerialiser ser(mServType);
|
RsNxsSerialiser ser(mServType);
|
||||||
|
|
||||||
@ -764,7 +764,7 @@ void RsGxsNetService::generic_sendItem(RsNxsItem *si)
|
|||||||
|
|
||||||
void RsGxsNetService::checkDistantSyncState()
|
void RsGxsNetService::checkDistantSyncState()
|
||||||
{
|
{
|
||||||
if(!mAllowDistSync)
|
if(!mAllowDistSync || mGxsNetTunnel==NULL)
|
||||||
return ;
|
return ;
|
||||||
|
|
||||||
RsGxsGrpMetaTemporaryMap grpMeta;
|
RsGxsGrpMetaTemporaryMap grpMeta;
|
||||||
@ -1676,7 +1676,7 @@ RsItem *RsGxsNetService::generic_recvItem()
|
|||||||
uint32_t size = 0 ;
|
uint32_t size = 0 ;
|
||||||
RsGxsNetTunnelVirtualPeerId virtual_peer_id ;
|
RsGxsNetTunnelVirtualPeerId virtual_peer_id ;
|
||||||
|
|
||||||
while(mAllowDistSync && mGxsNetTunnel->receiveData(mServType,data,size,virtual_peer_id))
|
while(mAllowDistSync && mGxsNetTunnel != NULL && mGxsNetTunnel->receiveData(mServType,data,size,virtual_peer_id))
|
||||||
{
|
{
|
||||||
RsNxsItem *item = dynamic_cast<RsNxsItem*>(RsNxsSerialiser(mServType).deserialise(data,&size)) ;
|
RsNxsItem *item = dynamic_cast<RsNxsItem*>(RsNxsSerialiser(mServType).deserialise(data,&size)) ;
|
||||||
item->PeerId(virtual_peer_id) ;
|
item->PeerId(virtual_peer_id) ;
|
||||||
|
@ -1358,6 +1358,14 @@ int RsServer::StartupRetroShare()
|
|||||||
mWiki->setNetworkExchangeService(wiki_ns) ;
|
mWiki->setNetworkExchangeService(wiki_ns) ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**** GXS Dist sync service ****/
|
||||||
|
#ifdef RS_USE_GXS_DISTANT_SYNC
|
||||||
|
RsGxsNetTunnelService *mGxsNetTunnel = new RsGxsNetTunnelService ;
|
||||||
|
#else
|
||||||
|
RsGxsNetTunnelService *mGxsNetTunnel = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**** Forum GXS service ****/
|
/**** Forum GXS service ****/
|
||||||
|
|
||||||
RsGeneralDataService* gxsforums_ds = new RsDataService(currGxsDir + "/", "gxsforums_db",
|
RsGeneralDataService* gxsforums_ds = new RsDataService(currGxsDir + "/", "gxsforums_db",
|
||||||
@ -1371,14 +1379,12 @@ int RsServer::StartupRetroShare()
|
|||||||
RS_SERVICE_GXS_TYPE_FORUMS, gxsforums_ds, nxsMgr,
|
RS_SERVICE_GXS_TYPE_FORUMS, gxsforums_ds, nxsMgr,
|
||||||
mGxsForums, mGxsForums->getServiceInfo(),
|
mGxsForums, mGxsForums->getServiceInfo(),
|
||||||
mReputations, mGxsCircles,mGxsIdService,
|
mReputations, mGxsCircles,mGxsIdService,
|
||||||
pgpAuxUtils);
|
pgpAuxUtils); //,mGxsNetTunnel,true,true,true);
|
||||||
|
|
||||||
mGxsForums->setNetworkExchangeService(gxsforums_ns) ;
|
mGxsForums->setNetworkExchangeService(gxsforums_ns) ;
|
||||||
|
|
||||||
/**** Channel GXS service ****/
|
/**** Channel GXS service ****/
|
||||||
|
|
||||||
RsGxsNetTunnelService *mGxsNetTunnel = new RsGxsNetTunnelService ;
|
|
||||||
|
|
||||||
RsGeneralDataService* gxschannels_ds = new RsDataService(currGxsDir + "/", "gxschannels_db",
|
RsGeneralDataService* gxschannels_ds = new RsDataService(currGxsDir + "/", "gxschannels_db",
|
||||||
RS_SERVICE_GXS_TYPE_CHANNELS, NULL, rsInitConfig->gxs_passwd);
|
RS_SERVICE_GXS_TYPE_CHANNELS, NULL, rsInitConfig->gxs_passwd);
|
||||||
|
|
||||||
|
@ -9,6 +9,8 @@ no_retroshare_gui:CONFIG -= retroshare_gui
|
|||||||
|
|
||||||
# CONFIG *= retrotor
|
# CONFIG *= retrotor
|
||||||
|
|
||||||
|
CONFIG *= gxsdistsync
|
||||||
|
|
||||||
# To disable RetroShare-nogui append the following
|
# To disable RetroShare-nogui append the following
|
||||||
# assignation to qmake command line "CONFIG+=no_retroshare_nogui"
|
# assignation to qmake command line "CONFIG+=no_retroshare_nogui"
|
||||||
CONFIG *= retroshare_nogui
|
CONFIG *= retroshare_nogui
|
||||||
@ -214,6 +216,7 @@ unfinished {
|
|||||||
CONFIG += wikipoos
|
CONFIG += wikipoos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gxsdistsync:DEFINES *= RS_USE_GXS_DISTANT_SYNC
|
||||||
wikipoos:DEFINES *= RS_USE_WIKI
|
wikipoos:DEFINES *= RS_USE_WIKI
|
||||||
rs_gxs:DEFINES *= RS_ENABLE_GXS
|
rs_gxs:DEFINES *= RS_ENABLE_GXS
|
||||||
libresapilocalserver:DEFINES *= LIBRESAPI_LOCAL_SERVER
|
libresapilocalserver:DEFINES *= LIBRESAPI_LOCAL_SERVER
|
||||||
|
Loading…
Reference in New Issue
Block a user