Delete the TTL timer if the slave is deactivating.
authorSung-jae Park <nicesj.park@samsung.com>
Mon, 8 Dec 2014 04:06:35 +0000 (13:06 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Mon, 8 Dec 2014 04:06:35 +0000 (13:06 +0900)
[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

index c16d329..1952182 100644 (file)
@@ -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