Fix correct handling of more than one event wanted in a single request
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24732 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -99,14 +99,14 @@ LocalDeviceHandler::ClearWantedEvent(BMessage* msg, uint16 event, uint16 opcode
|
|||||||
if ( (msg->FindInt16("opcodeExpected", eventIndex, &opcodeFound) == B_OK) &&
|
if ( (msg->FindInt16("opcodeExpected", eventIndex, &opcodeFound) == B_OK) &&
|
||||||
((uint16)opcodeFound != opcode) ) {
|
((uint16)opcodeFound != opcode) ) {
|
||||||
|
|
||||||
// FIX: this should remove only the entry
|
// this should remove only the entry
|
||||||
fEventsWanted.RemoveMessage(msg);
|
(void)msg->RemoveData("eventExpected", eventIndex);
|
||||||
|
(void)msg->RemoveData("opcodeExpected", eventIndex);
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Event matches so far
|
// Event matches so far
|
||||||
// FIX: this should remove only the entry
|
(void)msg->RemoveData("eventExpected", eventIndex);
|
||||||
fEventsWanted.RemoveMessage(msg);
|
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user