From b38a7a6e8402f5bb7a497a0bf5bc73570272bd71 Mon Sep 17 00:00:00 2001 From: Sung-jae Park Date: Mon, 8 Dec 2014 13:06:35 +0900 Subject: [PATCH] Delete the TTL timer if the slave is deactivating. [model] Redwood,Kiran,B3(Wearable) [binary_type] AP [customer] Docomo/Orange/ATT/Open [issue#] N/A [problem] [cause] [solution] [team] HomeTF [request] [horizontal_expansion] Change-Id: I871aa95585af0cef6f086f222199c82070b9d98b --- src/slave_life.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/slave_life.c b/src/slave_life.c index c16d329..1952182 100644 --- a/src/slave_life.c +++ b/src/slave_life.c @@ -161,10 +161,26 @@ static struct slave_node *slave_deactivate(struct slave_node *slave, int no_time { int ret; + /** + * @note + * The caller must has to check the slave's state. + * If it is not activated, this function must has not to be called. + */ + if (slave_pid(slave) <= 0) { return slave; } + if (slave->ttl_timer) { + /** + * @note + * If there is an activated TTL timer, + * It has to be cleared before deactivate the slave. + */ + ecore_timer_del(slave->ttl_timer); + slave->ttl_timer = NULL; + } + if ((slave->ctrl_option & PROVIDER_CTRL_MANUAL_TERMINATION) == PROVIDER_CTRL_MANUAL_TERMINATION) { /*! * \note -- 2.7.4