Module: sems
Branch: master
Commit: d8e60b72d4619acce21f21167ed27b6c0feedfb3
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=d8e60b72d4619acce21f21167ed27b6c0feedfb3

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Thu Nov 24 16:36:04 2011 +0100

sst: only react on proper timers (supress debug messages otherwise)

---

 core/plug-in/session_timer/SessionTimer.cpp |    7 +++++--
 core/plug-in/session_timer/SessionTimer.h   |    3 +++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/core/plug-in/session_timer/SessionTimer.cpp 
b/core/plug-in/session_timer/SessionTimer.cpp
index c88a85c..50018ad 100644
--- a/core/plug-in/session_timer/SessionTimer.cpp
+++ b/core/plug-in/session_timer/SessionTimer.cpp
@@ -64,8 +64,11 @@ bool SessionTimer::process(AmEvent* ev)
   assert(ev);
   AmTimeoutEvent* timeout_ev = dynamic_cast<AmTimeoutEvent*>(ev);
   if (timeout_ev) {
-    DBG("received timeout Event with ID %d\n", 
timeout_ev->data.get(0).asInt());
-    onTimeoutEvent(timeout_ev);
+    if (timeout_ev->data.get(0).asInt() >= ID_SESSION_TIMER_TIMERS_START &&
+       timeout_ev->data.get(0).asInt() <=ID_SESSION_TIMER_TIMERS_END) {
+      DBG("received timeout Event with ID %d\n", 
timeout_ev->data.get(0).asInt());
+      onTimeoutEvent(timeout_ev);
+    }
     return true;
   }
 
diff --git a/core/plug-in/session_timer/SessionTimer.h 
b/core/plug-in/session_timer/SessionTimer.h
index 8b476a1..eb11d45 100644
--- a/core/plug-in/session_timer/SessionTimer.h
+++ b/core/plug-in/session_timer/SessionTimer.h
@@ -39,6 +39,9 @@
 class AmTimeoutEvent;
 // these are the timer IDs for session timer
 // Caution: do not use these for other purposes
+#define ID_SESSION_TIMER_TIMERS_START -2
+#define ID_SESSION_TIMER_TIMERS_END -1
+
 #define ID_SESSION_INTERVAL_TIMER -1
 #define ID_SESSION_REFRESH_TIMER  -2
 

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to