[prev in list] [next in list] [prev in thread] [next in thread] 

List:       semsdev
Subject:    [Semsdev] git:master: subnot: made SingleSubscription::expires an absolute timestamp
From:       Raphael Coeffic <rco () iptel ! org>
Date:       2013-06-13 13:03:22
Message-ID: 20130613130322.15D33EF8076 () rimmer ! ryngle ! com
[Download RAW message or body]

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


Author: Raphael Coeffic <rco@iptel.org>
Committer: Raphael Coeffic <rco@iptel.org>
Date:   Thu Jun 13 13:58:17 2013 +0200

subnot: made SingleSubscription::expires an absolute timestamp

---

 core/AmSipSubscription.cpp |    4 ++--
 core/AmSipSubscription.h   |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/core/AmSipSubscription.cpp b/core/AmSipSubscription.cpp
index 8cefc13..30e2296 100644
--- a/core/AmSipSubscription.cpp
+++ b/core/AmSipSubscription.cpp
@@ -245,7 +245,7 @@ void SingleSubscription::replyFSM(const AmSipRequest& req, const \
AmSipReply& rep  if(sub_expires){
 	  DBG("setTimer(%s,SUBSCRIPTION_EXPIRE)\n",dlg()->getLocalTag().c_str());
 	  AmAppTimer::instance()->setTimer(&timer_expires,(double)sub_expires);
-	  expires = sub_expires;
+	  expires = sub_expires + AmAppTimer::instance()->unix_clock.get();
 	}
 	else {
 	  // we do not care too much, as timer N is set
@@ -319,7 +319,7 @@ void SingleSubscription::replyFSM(const AmSipRequest& req, const \
AmSipReply& rep  // reset expire timer
     DBG("setTimer(%s,SUBSCRIPTION_EXPIRE)\n",dlg()->getLocalTag().c_str());
     AmAppTimer::instance()->setTimer(&timer_expires,(double)notify_expire);
-    expires = notify_expire;
+    expires = notify_expire + AmAppTimer::instance()->unix_clock.get();
   }
 
   return;
diff --git a/core/AmSipSubscription.h b/core/AmSipSubscription.h
index 02a1f85..c9ab4e8 100644
--- a/core/AmSipSubscription.h
+++ b/core/AmSipSubscription.h
@@ -95,7 +95,7 @@ private:
   // state
   unsigned int sub_state;
   int  pending_subscribe;
-  unsigned int   expires;
+  unsigned long  expires;
 
   // timers
   SubscriptionTimer timer_n;
@@ -137,7 +137,7 @@ public:
   unsigned int getState() { return sub_state; }
   void setState(unsigned int st);
 
-  unsigned int getExpires() { return expires; }
+  unsigned long getExpires() { return expires; }
 
   void terminate();
   bool terminated();

_______________________________________________
Semsdev mailing list
Semsdev@lists.iptel.org
http://lists.iptel.org/mailman/listinfo/semsdev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic