Skip to content

Commit

Permalink
DPL: Protect agains empty header with non empty payload
Browse files Browse the repository at this point in the history
Not sure when that can actually happen, but clearly elsewhere we
handle it as a separate case.
  • Loading branch information
ktf committed Oct 12, 2023
1 parent facbf10 commit 81e773b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Framework/Core/src/CompletionPolicyHelpers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ CompletionPolicy CompletionPolicyHelpers::consumeWhenAny(const char* name, Compl
if (input.header != nullptr) {
return CompletionPolicy::CompletionOp::Consume;
}
if (input.payload != nullptr) {
LOGP(warning, "Input has payload, but no header. This should not happen.");
return CompletionPolicy::CompletionOp::Discard;
}
}
return CompletionPolicy::CompletionOp::Wait;
};
Expand Down

0 comments on commit 81e773b

Please sign in to comment.