From d05917942b4a46fccad770655235fbfdc06bbf99 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:56:12 +0000 Subject: 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) --- Ivy/Ivy.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Ivy') 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; } -- cgit v1.1