From 21ca8d808ed43ca1c49c532c29e258057709d349 Mon Sep 17 00:00:00 2001 From: Giedrius Date: Fri, 17 Jun 2016 18:50:34 +0300 Subject: [PATCH] Fix extPanId size in NCP scan result packet (#163) * Fix extPanId size in NCP scan result packet wpantund scan result handler expects extPanId size to be 0 or 8. If not - it stops scan result handling. Because mExtPanId is a pointer, it's size is architecture dependent, and scanning (by chance) works only on 64bit machines. extPanId size should be (is) a constant. * ncp: Use extPanId size from Thread API headers OT_EXT_PAN_ID_SIZE is defined in Thread API headers. This removes dependecy from Thread source files. --- src/ncp/ncp_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ncp/ncp_base.cpp b/src/ncp/ncp_base.cpp index 54ad0e71b..367218304 100644 --- a/src/ncp/ncp_base.cpp +++ b/src/ncp/ncp_base.cpp @@ -342,7 +342,7 @@ void NcpBase::HandleActiveScanResult(otActiveScanResult *result) SPINEL_PROTOCOL_TYPE_THREAD, flags, result->mNetworkName, - result->mExtPanId, sizeof(result->mExtPanId) + result->mExtPanId, OT_EXT_PAN_ID_SIZE ); } else