summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfcolin2007-02-01 12:56:12 +0000
committerfcolin2007-02-01 12:56:12 +0000
commitd05917942b4a46fccad770655235fbfdc06bbf99 (patch)
treeddf934573122bfdcbcaa958c6dcacf29f2cb56ed
parentf2271c04c9c833d3c4c8a9dc2d5cd579cb97913d (diff)
downloadivy-cplusplus-d05917942b4a46fccad770655235fbfdc06bbf99.zip
ivy-cplusplus-d05917942b4a46fccad770655235fbfdc06bbf99.tar.gz
ivy-cplusplus-d05917942b4a46fccad770655235fbfdc06bbf99.tar.bz2
ivy-cplusplus-d05917942b4a46fccad770655235fbfdc06bbf99.tar.xz
Utilisateur : Fcolin Date : 12/05/05 Heure : 14:05 Archivé dans $/Bus/Ivy Commentaire: Bug dans Ivy GetApplication ( name ) pas de release de la section critique!! (vss 18)
-rw-r--r--Ivy/Ivy.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/Ivy/Ivy.cxx b/Ivy/Ivy.cxx
index b592c11..e7505d1 100644
--- a/Ivy/Ivy.cxx
+++ b/Ivy/Ivy.cxx
@@ -260,18 +260,20 @@ void Ivy::SendDieMsg( IvyApplication *app )
}
IvyApplication * Ivy::GetApplication(const char *name)
{
+ IvyApplication *app = NULL;
EnterCriticalSection( &m_application_cs );
IvyApplicationList::iterator iter;
for ( iter = applications.begin() ; iter != applications.end() ; )
{
- IvyApplication *app = *iter++;
- if ( (app->m_hSocket != INVALID_SOCKET) && app->appname == name )
+ IvyApplication *ap = *iter++;
+ if ( (ap->m_hSocket != INVALID_SOCKET) && ap->appname == name )
{
- return app;
+ app = ap;
+ break; // dont return because of LeaveCriticalSection !!!
}
}
LeaveCriticalSection( &m_application_cs );
- return NULL;
+ return app;
}