From 39511c2d3f5a6e96d89cc1260831ad3d3a0e8704 Mon Sep 17 00:00:00 2001 From: sarthak shaha <130495524+Sarthak-Shaha@users.noreply.github.com> Date: Tue, 15 Aug 2023 12:40:24 -0400 Subject: [PATCH] 1. Modfified the API call otThreadGetNetworkKey() from OpenThreadUtils.cpp to follow the appropriate API call (#28638) --- src/platform/OpenThread/OpenThreadUtils.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/platform/OpenThread/OpenThreadUtils.cpp b/src/platform/OpenThread/OpenThreadUtils.cpp index 2ceaae6100cbcb..6f89d1a4a28052 100644 --- a/src/platform/OpenThread/OpenThreadUtils.cpp +++ b/src/platform/OpenThread/OpenThreadUtils.cpp @@ -126,9 +126,10 @@ void LogOpenThreadStateChange(otInstance * otInst, uint32_t flags) } #if CHIP_CONFIG_SECURITY_TEST_MODE { - const otNetworkKey * otKey = otThreadGetNetworkKey(otInst); + otNetworkKey otKey; + otThreadGetNetworkKey(otInst, &otKey); for (int i = 0; i < OT_NETWORK_KEY_SIZE; i++) - snprintf(&strBuf[i * 2], 3, "%02X", otKey->m8[i]); + snprintf(&strBuf[i * 2], 3, "%02X", otKey.m8[i]); ChipLogDetail(DeviceLayer, " Network Key: %s", strBuf); } #endif // CHIP_CONFIG_SECURITY_TEST_MODE