From d9893c8c6291edbe4e7e304779a70316efbe0388 Mon Sep 17 00:00:00 2001 From: Chirag Bansal Date: Fri, 1 Jul 2022 04:39:46 +0530 Subject: [PATCH] resolving comments, issue with handing out the pointer(ap.bssid) and using an array --- src/platform/EFR32/DiagnosticDataProviderImpl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/platform/EFR32/DiagnosticDataProviderImpl.cpp b/src/platform/EFR32/DiagnosticDataProviderImpl.cpp index 9c2aa73c91ffe3..bee1951f916b7c 100644 --- a/src/platform/EFR32/DiagnosticDataProviderImpl.cpp +++ b/src/platform/EFR32/DiagnosticDataProviderImpl.cpp @@ -346,9 +346,11 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBssId(ByteSpan & BssId) { wfx_wifi_scan_result_t ap; int32_t err = wfx_get_ap_info(&ap); + static uint8_t bssid[6]; if (err == 0) { - BssId = ByteSpan(ap.bssid, 6); + memcpy(bssid,ap.bssid,6); + BssId = ByteSpan(bssid, 6); return CHIP_NO_ERROR; } return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;