Skip to content

Commit 4bb9512

Browse files
committed
mctp-estack: Rework router waker handling
The same AppCookie mechanism is now shared between Listener and RespChannel. This is an internal implementation change, the only external API change is the renamed MAX_CHANNELS. Signed-off-by: Matt Johnston <[email protected]>
1 parent 3271079 commit 4bb9512

File tree

2 files changed

+184
-148
lines changed

2 files changed

+184
-148
lines changed

mctp-estack/src/lib.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -496,14 +496,7 @@ impl Stack {
496496
) -> Option<ReceiveHandle> {
497497
// Find the earliest matching entry
498498
self.done_reassemblers()
499-
.filter(|(_i, re)| {
500-
if let Some(c) = re.cookie {
501-
if cookies.contains(&c) {
502-
return true;
503-
}
504-
}
505-
false
506-
})
499+
.filter(|(_i, re)| re.cookie.is_some_and(|c| cookies.contains(&c)))
507500
.min_by_key(|(_i, re)| re.stamp)
508501
.map(|(i, re)| re.take_handle(i))
509502
}

0 commit comments

Comments
 (0)