Skip to content

Commit

Permalink
Fix infinite recursion if the bare-int-for-timeout version of InvokeC…
Browse files Browse the repository at this point in the history
…ommandRequest is used. (#12957)

We end up just calling the same function, which is not what we want:
we want to call the version that takes an Optional.

This codepath is not exercised in our CI (which all goes through the
CHIPClusters.h helpers), hence this problem wasn't caught.
  • Loading branch information
bzbarsky-apple authored Dec 13, 2021
1 parent ed367ec commit 5d10320
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controller/InvokeInteraction.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ InvokeCommandRequest(Messaging::ExchangeManager * exchangeMgr, SessionHandle ses
uint16_t timedInvokeTimeoutMs)
{
return InvokeCommandRequest(exchangeMgr, sessionHandle, endpointId, requestCommandData, onSuccessCb, onErrorCb,
timedInvokeTimeoutMs);
MakeOptional(timedInvokeTimeoutMs));
}

template <typename RequestObjectT, typename std::enable_if_t<!RequestObjectT::MustUseTimedInvoke(), int> = 0>
Expand Down

0 comments on commit 5d10320

Please sign in to comment.