BMessenger::Target() uses BLooperList now.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@261 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2002-07-16 23:28:07 +00:00
parent 0e1fa9f1ad
commit e1f41e5d53
1 changed files with 3 additions and 7 deletions

View File

@ -37,6 +37,7 @@
#include <Application.h>
#include <Handler.h>
#include <Looper.h>
#include <LooperList.h>
#include <Message.h>
#include <Messenger.h>
#include <OS.h>
@ -256,13 +257,8 @@ BMessenger::Target(BLooper **looper) const
gDefaultTokens.GetToken(fHandlerToken, B_HANDLER_TOKEN,
(void**)&handler);
}
if (looper) {
if (BLooper::sLooperListLock.Lock()) {
*looper = BLooper::LooperForPort(fPort);
BLooper::sLooperListLock.Unlock();
} else
*looper = NULL;
}
if (looper)
*looper = BPrivate::gLooperList.LooperForPort(fPort);
} else if (looper)
*looper = NULL;
return handler;