summaryrefslogtreecommitdiff
path: root/utils/MsgTask.cpp
diff options
context:
space:
mode:
authorNeethu Joseph <neethuj@codeaurora.org>2015-07-10 16:25:51 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2015-08-04 14:59:48 -0700
commit50ae85852a064ee989168c935a59096976fa4ad1 (patch)
tree4705558a2d2a55b63bdf1caab611bba4200abd36 /utils/MsgTask.cpp
parentbb5d2d4bfb12df717f35f3d2365ce0263d319fe7 (diff)
MsgTask thread must call associator function always
All instances of MsgTask were not calling associator because of a use of a static variable check. All instance of MsgTask thread must call the associator. CRs-Fixed: 870450 Change-Id: I18314ec3ca0fe21f4bbd12a505bf552e64e25307
Diffstat (limited to 'utils/MsgTask.cpp')
-rw-r--r--utils/MsgTask.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/utils/MsgTask.cpp b/utils/MsgTask.cpp
index 8b645dd..794bf92 100644
--- a/utils/MsgTask.cpp
+++ b/utils/MsgTask.cpp
@@ -101,11 +101,7 @@ void MsgTask::associate(tAssociate tAssociator) const {
LocAssociateMsg(tAssociate associator) :
mAssociator(associator) {}
inline virtual void proc() const {
- static bool sAssociated = false;
- if (!sAssociated) {
- sAssociated = true;
- mAssociator();
- }
+ mAssociator();
}
};
sendMsg(new LocAssociateMsg(tAssociator));
@@ -124,7 +120,7 @@ MsgTask::MsgTask(tAssociate tAssociator, const char* threadName) :
if (!mThread->start(threadName, this, false)) {
delete mThread;
mThread = NULL;
- } else {
+ } else if (tAssociator != NULL){
associate(tAssociator);
}
}