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:
Oliver Ruiz Dorantes
2008-04-01 21:51:31 +00:00
parent 1f3aa49890
commit 1ba54b5b31
+5 -5
View File
@@ -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;
} }