From 48a53830757dddac613136f25afe06cdf303668d Mon Sep 17 00:00:00 2001
From: Cedric Roux <cedric.roux@eurecom.fr>
Date: Tue, 17 Dec 2013 08:51:35 +0000
Subject: [PATCH] - Fix correct removal of NAS timer

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4748 818b1a75-f10b-46b9-bf7c-635c3b92a50f
---
 openair-cn/NAS/EURECOM-NAS/src/util/nas_timer.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/openair-cn/NAS/EURECOM-NAS/src/util/nas_timer.c b/openair-cn/NAS/EURECOM-NAS/src/util/nas_timer.c
index 2f04c86e5e..389822ac6d 100644
--- a/openair-cn/NAS/EURECOM-NAS/src/util/nas_timer.c
+++ b/openair-cn/NAS/EURECOM-NAS/src/util/nas_timer.c
@@ -283,8 +283,14 @@ int nas_timer_stop(int id)
 {
     /* Check if the timer entry is active */
     if (_nas_timer_db_is_active(id)) {
+        nas_timer_entry_t *entry;
         /* Remove the entry from the timer queue */
-        (void) _nas_timer_db_remove_entry(id);
+        entry = _nas_timer_db_remove_entry(id);
+#if defined(ENABLE_ITTI)
+        timer_remove(entry->timer_id);
+#else
+        (void)entry;
+#endif
         /* Delete the timer entry */
         _nas_timer_db_delete_entry(id);
         return (NAS_TIMER_INACTIVE_ID);
-- 
GitLab