diff --git a/src/core/coap/coap_server.hpp b/src/core/coap/coap_server.hpp index c3c57a72e..1c929829a 100644 --- a/src/core/coap/coap_server.hpp +++ b/src/core/coap/coap_server.hpp @@ -80,6 +80,7 @@ public: mUriPath = aUriPath; mHandler = aHandler; mContext = aContext; + mNext = NULL; } private: diff --git a/src/core/common/timer.hpp b/src/core/common/timer.hpp index 82c0a8480..a44066b50 100644 --- a/src/core/common/timer.hpp +++ b/src/core/common/timer.hpp @@ -136,7 +136,13 @@ public: * @param[in] aContext A pointer to arbitrary context information. * */ - Timer(Handler aHandler, void *aContext) { mNext = NULL; mHandler = aHandler; mContext = aContext; } + Timer(Handler aHandler, void *aContext) { + mHandler = aHandler; + mContext = aContext; + mT0 = 0; + mDt = 0; + mNext = NULL; + } /** * This method returns the start time in milliseconds for the timer. diff --git a/src/core/net/icmp6.hpp b/src/core/net/icmp6.hpp index e7007da52..8951e8c21 100644 --- a/src/core/net/icmp6.hpp +++ b/src/core/net/icmp6.hpp @@ -294,6 +294,7 @@ public: IcmpHandler(DstUnreachHandler aDstUnreachHandler, void *aContext) { mDstUnreachHandler = aDstUnreachHandler; mContext = aContext; + mNext = NULL; } private: @@ -303,9 +304,9 @@ private: DstUnreachHandler mDstUnreachHandler; void *mContext; - IcmpHandler *mNext; + IcmpHandler *mNext; - static IcmpHandler *sHandlers; + static IcmpHandler *sHandlers; }; /** diff --git a/src/core/thread/key_manager.cpp b/src/core/thread/key_manager.cpp index 0bcbf8967..37acc8526 100644 --- a/src/core/thread/key_manager.cpp +++ b/src/core/thread/key_manager.cpp @@ -48,8 +48,11 @@ KeyManager::KeyManager(ThreadNetif &aThreadNetif): mNetif(aThreadNetif) { mPreviousKeyValid = false; + mMasterKeyLength = 0; mMacFrameCounter = 0; mMleFrameCounter = 0; + mCurrentKeySequence = 0; + mPreviousKeySequence = 0; } const uint8_t *KeyManager::GetMasterKey(uint8_t *aKeyLength) const diff --git a/src/core/thread/mesh_forwarder.cpp b/src/core/thread/mesh_forwarder.cpp index 5326d4b6e..ef1af8cc7 100644 --- a/src/core/thread/mesh_forwarder.cpp +++ b/src/core/thread/mesh_forwarder.cpp @@ -68,6 +68,13 @@ MeshForwarder::MeshForwarder(ThreadNetif &aThreadNetif): mSendBusy = false; mEnabled = false; + mMessageNextOffset = 0; + mMacSource.mLength = 0; + mMacDest.mLength = 0; + mMeshSource = Mac::kShortAddrInvalid; + mMeshDest = Mac::kShortAddrInvalid; + mAddMeshHeader = false; + mMac.RegisterReceiver(mMacReceiver); } diff --git a/src/core/thread/mle.cpp b/src/core/thread/mle.cpp index 205665715..1fb031505 100644 --- a/src/core/thread/mle.cpp +++ b/src/core/thread/mle.cpp @@ -66,6 +66,7 @@ Mle::Mle(ThreadNetif &aThreadNetif) : ModeTlv::kModeFullNetworkData; mParentRequestState = kParentIdle; mParentRequestMode = kMleAttachAnyPartition; + mParentConnectivity = 0; mTimeout = kMaxNeighborAge; memset(&mLeaderData, 0, sizeof(mLeaderData)); @@ -209,6 +210,7 @@ ThreadError Mle::BecomeChild(otMleAttachFilter aFilter) mParentRequestState = kParentRequestStart; mParentRequestMode = aFilter; + mParentConnectivity = 0; memset(&mParent, 0, sizeof(mParent)); if (aFilter == kMleAttachAnyPartition) diff --git a/src/core/thread/mle_router.cpp b/src/core/thread/mle_router.cpp index 03be94466..123af6bfd 100644 --- a/src/core/thread/mle_router.cpp +++ b/src/core/thread/mle_router.cpp @@ -67,6 +67,7 @@ MleRouter::MleRouter(ThreadNetif &aThreadNetif): mRouterId = kMaxRouterId; mPreviousRouterId = kMaxRouterId; mAdvertiseInterval = kAdvertiseIntervalMin; + mRouterIdSequenceLastUpdated = 0; mCoapMessageId = otPlatRandomGet(); } diff --git a/src/core/thread/network_data_local.cpp b/src/core/thread/network_data_local.cpp index 8710ca157..db4e3a2fa 100644 --- a/src/core/thread/network_data_local.cpp +++ b/src/core/thread/network_data_local.cpp @@ -48,6 +48,7 @@ Local::Local(ThreadNetif &aThreadNetif): NetworkData(), mMle(aThreadNetif.GetMle()) { + mCoapMessageId = 0; } ThreadError Local::AddOnMeshPrefix(const uint8_t *aPrefix, uint8_t aPrefixLength, int8_t aPrf,