Final changes as we head towards V0.4.09a release.

* Switched on RELEASE flag in libretroshare.
 * Added missing Mutex lock in upnphandler.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@598 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-06-13 23:22:20 +00:00
parent 76e877c2b6
commit 9c2558dbf0
2 changed files with 16 additions and 10 deletions

View File

@ -78,6 +78,8 @@
#define RS_RELEASE 1 #define RS_RELEASE 1
****/ ****/
#define RS_RELEASE 1
/**************** PQI_USE_XPGP ******************/ /**************** PQI_USE_XPGP ******************/
#if defined(PQI_USE_XPGP) #if defined(PQI_USE_XPGP)
@ -567,10 +569,6 @@ int RsServer::StartupRetroShare(RsInit *config)
std::string localcachedir = config_dir + "/cache/local"; std::string localcachedir = config_dir + "/cache/local";
std::string remotecachedir = config_dir + "/cache/remote"; std::string remotecachedir = config_dir + "/cache/remote";
#ifndef RS_RELEASE
p3GameLauncher *gameLauncher = new p3GameLauncher(mConnMgr);
pqih -> addService(gameLauncher);
mRanking = new p3Ranking(mConnMgr, RS_SERVICE_TYPE_RANK, /* declaration of cache enable service rank */ mRanking = new p3Ranking(mConnMgr, RS_SERVICE_TYPE_RANK, /* declaration of cache enable service rank */
mCacheStrapper, mCacheTransfer, mCacheStrapper, mCacheTransfer,
localcachedir, remotecachedir, 3600 * 24 * 30); localcachedir, remotecachedir, 3600 * 24 * 30);
@ -578,6 +576,10 @@ int RsServer::StartupRetroShare(RsInit *config)
CachePair cp(mRanking, mRanking, CacheId(RS_SERVICE_TYPE_RANK, 0)); CachePair cp(mRanking, mRanking, CacheId(RS_SERVICE_TYPE_RANK, 0));
mCacheStrapper -> addCachePair(cp); /* end of declaration */ mCacheStrapper -> addCachePair(cp); /* end of declaration */
#ifndef RS_RELEASE
p3GameLauncher *gameLauncher = new p3GameLauncher(mConnMgr);
pqih -> addService(gameLauncher);
p3PhotoService *photoService = new p3PhotoService(RS_SERVICE_TYPE_PHOTO, /* .... for photo service */ p3PhotoService *photoService = new p3PhotoService(RS_SERVICE_TYPE_PHOTO, /* .... for photo service */
mCacheStrapper, mCacheTransfer, mCacheStrapper, mCacheTransfer,
localcachedir, remotecachedir); localcachedir, remotecachedir);
@ -601,9 +603,8 @@ int RsServer::StartupRetroShare(RsInit *config)
pqih -> addService(mForums); /* This must be also ticked as a service */ pqih -> addService(mForums); /* This must be also ticked as a service */
#else #else
mRanking = NULL; mQblog = NULL;
mQBlog = NULL; //mForums = NULL;
mForums = NULL;
#endif #endif
/**************************************************************************/ /**************************************************************************/
@ -626,8 +627,8 @@ int RsServer::StartupRetroShare(RsInit *config)
mConfigMgr->addConfiguration("general.cfg", mGeneralConfig); mConfigMgr->addConfiguration("general.cfg", mGeneralConfig);
mConfigMgr->addConfiguration("msgs.cfg", msgSrv); mConfigMgr->addConfiguration("msgs.cfg", msgSrv);
mConfigMgr->addConfiguration("cache.cfg", mCacheStrapper); mConfigMgr->addConfiguration("cache.cfg", mCacheStrapper);
#ifndef RS_RELEASE
mConfigMgr->addConfiguration("ranklink.cfg", mRanking); mConfigMgr->addConfiguration("ranklink.cfg", mRanking);
#ifndef RS_RELEASE
mConfigMgr->addConfiguration("qblog.cfg", mQblog); mConfigMgr->addConfiguration("qblog.cfg", mQblog);
mConfigMgr->addConfiguration("forums.cfg", mForums); mConfigMgr->addConfiguration("forums.cfg", mForums);
#endif #endif
@ -753,10 +754,11 @@ int RsServer::StartupRetroShare(RsInit *config)
rsPeers = new p3Peers(mConnMgr, mAuthMgr); rsPeers = new p3Peers(mConnMgr, mAuthMgr);
rsMsgs = new p3Msgs(mAuthMgr, msgSrv, chatSrv); rsMsgs = new p3Msgs(mAuthMgr, msgSrv, chatSrv);
rsDisc = new p3Discovery(ad); rsDisc = new p3Discovery(ad);
rsRanks = new p3Rank(mRanking);
#ifndef RS_RELEASE #ifndef RS_RELEASE
rsGameLauncher = gameLauncher; rsGameLauncher = gameLauncher;
rsPhoto = new p3Photo(photoService); rsPhoto = new p3Photo(photoService);
rsRanks = new p3Rank(mRanking);
rsForums = mForums; rsForums = mForums;
rsStatus = new p3Status(); rsStatus = new p3Status();
rsQblog = new p3Blog(mQblog); rsQblog = new p3Blog(mQblog);
@ -764,7 +766,6 @@ int RsServer::StartupRetroShare(RsInit *config)
#else #else
rsGameLauncher = NULL; rsGameLauncher = NULL;
rsPhoto = NULL; rsPhoto = NULL;
rsRanks = NULL;
rsForums = NULL; rsForums = NULL;
rsStatus = NULL; rsStatus = NULL;
rsQblog = NULL; rsQblog = NULL;

View File

@ -87,10 +87,15 @@ bool upnphandler::initUPnPState()
fprintf(stderr, "No IGD UPnP Device found on the network !\n"); fprintf(stderr, "No IGD UPnP Device found on the network !\n");
} }
/* MODIFY STATE */
dataMtx.lock(); /* LOCK MUTEX */
upnpState = RS_UPNP_S_UNAVAILABLE; upnpState = RS_UPNP_S_UNAVAILABLE;
delete upcd; delete upcd;
upnpConfig = NULL; upnpConfig = NULL;
dataMtx.unlock(); /* UNLOCK MUTEX */
/* done, FAILED -> NOT AVAILABLE */ /* done, FAILED -> NOT AVAILABLE */
return 0; return 0;