From c2598bf4c9fdd30aadc2a29a5b4619ab134b1453 Mon Sep 17 00:00:00 2001 From: Xiao Ma Date: Tue, 29 Nov 2016 11:22:02 +0800 Subject: [PATCH] Include the operational dataset tlv in Data Response unicast to SED. (#1012) --- src/core/thread/mle_router.cpp | 6 ++++-- tools/harness-thci/ARM.py | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/core/thread/mle_router.cpp b/src/core/thread/mle_router.cpp index 6bc23aa05..d00025226 100644 --- a/src/core/thread/mle_router.cpp +++ b/src/core/thread/mle_router.cpp @@ -2410,7 +2410,7 @@ exit: ThreadError MleRouter::HandleNetworkDataUpdateRouter(void) { - static const uint8_t tlvs[] = {Tlv::kLeaderData, Tlv::kNetworkData}; + static const uint8_t tlvs[] = {Tlv::kNetworkData}; Ip6::Address destination; VerifyOrExit(mDeviceState == kDeviceStateRouter || mDeviceState == kDeviceStateLeader, ;); @@ -2445,7 +2445,9 @@ ThreadError MleRouter::HandleNetworkDataUpdateRouter(void) { if (child->mNetworkDataVersion != mNetworkData.GetStableVersion()) { - SendDataResponse(destination, tlvs, sizeof(tlvs)); + static const uint8_t responseTlvs[] = {Tlv::kNetworkData, Tlv::kActiveDataset, Tlv::kPendingDataset}; + + SendDataResponse(destination, responseTlvs, sizeof(responseTlvs)); } } } diff --git a/tools/harness-thci/ARM.py b/tools/harness-thci/ARM.py index 05f19cf30..aba352da1 100644 --- a/tools/harness-thci/ARM.py +++ b/tools/harness-thci/ARM.py @@ -1957,7 +1957,7 @@ class ARM(IThci): else: return False except Exception, e: - modulehelper.writeintodebuglogger("allowcommission() error: " + str(e)) + Modulehelper.writeintodebuglogger("allowcommission() error: " + str(e)) def joinCommissioned(self, strPSKd='threadjpaketest', waitTime=20): """start joiner @@ -2057,7 +2057,7 @@ class ARM(IThci): print cmd return self.__sendCommand(cmd) == 'Done' except Exception, e: - modulehelper.writeintodebuglogger("MGMT_ED_SCAN() error: " + str(e)) + Modulehelper.writeintodebuglogger("MGMT_ED_SCAN() error: " + str(e)) def MGMT_PANID_QUERY(self, sAddr, xCommissionerSessionId, listChannelMask, xPanId): """send MGMT_PANID_QUERY message to a given destination @@ -2082,7 +2082,7 @@ class ARM(IThci): print cmd return self.__sendCommand(cmd) == 'Done' except Exception, e: - modulehelper.writeintodebuglogger("MGMT_PANID_QUERY() error: " + str(e)) + Modulehelper.writeintodebuglogger("MGMT_PANID_QUERY() error: " + str(e)) def MGMT_ANNOUNCE_BEGIN(self, sAddr, xCommissionerSessionId, listChannelMask, xCount, xPeriod): """send MGMT_ANNOUNCE_BEGIN message to a given destination @@ -2099,7 +2099,7 @@ class ARM(IThci): print cmd return self.__sendCommand(cmd) == 'Done' except Exception, e: - modulehelper.writeintodebuglogger("MGMT_ANNOUNCE_BEGIN() error: " + str(e)) + Modulehelper.writeintodebuglogger("MGMT_ANNOUNCE_BEGIN() error: " + str(e)) def MGMT_ACTIVE_GET(self, Addr='', TLVs=[]): """send MGMT_ACTIVE_GET command