diff options
author | fcolin | 2007-02-01 12:56:12 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 12:56:12 +0000 |
commit | 4d92a221085b1c37564a93a82a099f8d0fb274f1 (patch) | |
tree | b1fc31ea6c86a18a05f61e26f3603d880a72619e /Bus | |
parent | 8b6a0c9337cc3ff7ad01cffd2e1c54e3338f331c (diff) | |
download | ivy-cplusplus-4d92a221085b1c37564a93a82a099f8d0fb274f1.zip ivy-cplusplus-4d92a221085b1c37564a93a82a099f8d0fb274f1.tar.gz ivy-cplusplus-4d92a221085b1c37564a93a82a099f8d0fb274f1.tar.bz2 ivy-cplusplus-4d92a221085b1c37564a93a82a099f8d0fb274f1.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)
Diffstat (limited to 'Bus')
-rw-r--r-- | Bus/Ivy/Ivy.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
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;
}
|