From 4d92a221085b1c37564a93a82a099f8d0fb274f1 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) --- Bus/Ivy/Ivy.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Bus/Ivy/Ivy.cxx') diff --git a/Bus/Ivy/Ivy.cxx b/Bus/Ivy/Ivy.cxx index b592c11..e7505d1 100644 --- a/Bus/Ivy/Ivy.cxx +++ b/Bus/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