From 2a10428c5c1d8badd6ae9fc65d984e49ef89a73f Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 13 Dec 2021 15:03:40 -0500 Subject: [PATCH] Fix infinite recursion if the bare-int-for-timeout version of InvokeCommandRequest is used. 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. --- src/controller/InvokeInteraction.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller/InvokeInteraction.h b/src/controller/InvokeInteraction.h index d24ad57c64e777..856b8a64323db6 100644 --- a/src/controller/InvokeInteraction.h +++ b/src/controller/InvokeInteraction.h @@ -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 = 0>