From 52a11d0a9323253699f681a986e89748d9f81dcc Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Tue, 11 Jul 2017 10:49:35 -0700 Subject: [PATCH] [supervision] Fix timer callbacks to follow the new model (#1974) --- src/core/utils/child_supervision.cpp | 6 +++--- src/core/utils/child_supervision.hpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/utils/child_supervision.cpp b/src/core/utils/child_supervision.cpp index 41541220d..c422cbf13 100644 --- a/src/core/utils/child_supervision.cpp +++ b/src/core/utils/child_supervision.cpp @@ -133,7 +133,7 @@ void ChildSupervisor::UpdateOnSend(Child &aChild) aChild.ResetSecondsSinceLastSupervision(); } -void ChildSupervisor::HandleTimer(TimerMilli &aTimer) +void ChildSupervisor::HandleTimer(Timer &aTimer) { GetOwner(aTimer).HandleTimer(); } @@ -183,7 +183,7 @@ ChildSupervisor &ChildSupervisor::GetOwner(const Context &aContext) SupervisionListener::SupervisionListener(ThreadNetif &aThreadNetif) : ThreadNetifLocator(aThreadNetif), - mTimer(aThreadNetif.GetIp6().mTimerMilliScheduler, &SupervisionListener::HandleTimer, this), + mTimer(aThreadNetif.GetIp6(), &SupervisionListener::HandleTimer, this), mTimeout(0) { SetTimeout(kDefaultTimeout); @@ -240,7 +240,7 @@ void SupervisionListener::RestartTimer(void) } } -void SupervisionListener::HandleTimer(TimerMilli &aTimer) +void SupervisionListener::HandleTimer(Timer &aTimer) { GetOwner(aTimer).HandleTimer(); } diff --git a/src/core/utils/child_supervision.hpp b/src/core/utils/child_supervision.hpp index 5bfab2f79..143c267ec 100644 --- a/src/core/utils/child_supervision.hpp +++ b/src/core/utils/child_supervision.hpp @@ -156,7 +156,7 @@ private: }; void SendMessage(Child &aChild); - static void HandleTimer(TimerMilli &aTimer); + static void HandleTimer(Timer &aTimer); void HandleTimer(void); static ChildSupervisor &GetOwner(const Context &aContext); @@ -248,7 +248,7 @@ private: }; void RestartTimer(void); - static void HandleTimer(TimerMilli &aTimer); + static void HandleTimer(Timer &aTimer); void HandleTimer(void); static SupervisionListener &GetOwner(const Context &aContext);