mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-25 09:11:28 -05:00
corrected deadlock
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.4.x@1856 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
fc9e86c6a7
commit
79eccf3d6a
@ -142,15 +142,14 @@ int RsServer::UpdateAllConfig()
|
||||
|
||||
/* Notify of Changes */
|
||||
// iface.setChanged(RsIface::Config);
|
||||
rsicontrol->getNotify().notifyListChange(NOTIFY_LIST_CONFIG, NOTIFY_TYPE_MOD);
|
||||
|
||||
/* unlock Mutexes */
|
||||
iface.unlockData(); /* UNLOCK */
|
||||
unlockRsCore(); /* UNLOCK */
|
||||
|
||||
rsicontrol->getNotify().notifyListChange(NOTIFY_LIST_CONFIG, NOTIFY_TYPE_MOD);
|
||||
|
||||
return 1;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void RsServer::ConfigFinalSave()
|
||||
|
@ -467,22 +467,24 @@ void upnphandler::restart()
|
||||
|
||||
bool upnphandler::getEnabled()
|
||||
{
|
||||
dataMtx.lock(); /*** LOCK MUTEX ***/
|
||||
// no need to lock for reading a boolean
|
||||
// dataMtx.lock(); /*** LOCK MUTEX ***/
|
||||
|
||||
bool on = toEnable;
|
||||
|
||||
dataMtx.unlock(); /*** UNLOCK MUTEX ***/
|
||||
// dataMtx.unlock(); /*** UNLOCK MUTEX ***/
|
||||
|
||||
return on;
|
||||
}
|
||||
|
||||
bool upnphandler::getActive()
|
||||
{
|
||||
dataMtx.lock(); /*** LOCK MUTEX ***/
|
||||
// no need to lock for reading a boolean
|
||||
// dataMtx.lock(); /*** LOCK MUTEX ***/
|
||||
|
||||
bool on = (upnpState == RS_UPNP_S_ACTIVE);
|
||||
|
||||
dataMtx.unlock(); /*** UNLOCK MUTEX ***/
|
||||
// dataMtx.unlock(); /*** UNLOCK MUTEX ***/
|
||||
|
||||
return on;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user