From 8a7ba72c451fcc771e74e1da122e64a3b150ce93 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Mon, 11 Dec 2023 22:10:51 +0100 Subject: [PATCH] Call callback with context (self) --- src/controller/python/ChipDeviceController-ScriptBinding.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controller/python/ChipDeviceController-ScriptBinding.cpp b/src/controller/python/ChipDeviceController-ScriptBinding.cpp index 1562dba31cc793..0a58c15d271504 100644 --- a/src/controller/python/ChipDeviceController-ScriptBinding.cpp +++ b/src/controller/python/ChipDeviceController-ScriptBinding.cpp @@ -745,14 +745,14 @@ struct GetDeviceCallbacks { auto * self = static_cast(context); auto * operationalDeviceProxy = new OperationalDeviceProxy(&exchangeMgr, sessionHandle); - self->mCallback(operationalDeviceProxy, ToPyChipError(CHIP_NO_ERROR)); + self->mCallback(context, operationalDeviceProxy, ToPyChipError(CHIP_NO_ERROR)); delete self; } static void OnConnectionFailureFn(void * context, const ScopedNodeId & peerId, CHIP_ERROR error) { auto * self = static_cast(context); - self->mCallback(nullptr, ToPyChipError(error)); + self->mCallback(context, nullptr, ToPyChipError(error)); delete self; }