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

Author: Raphael Coeffic <[email protected]>
Committer: Raphael Coeffic <[email protected]>
Date:   Fri Mar 15 13:52:16 2013 +0100

sbc: allows to check when a rate-limiter has been last updated.

---

 apps/sbc/RateLimit.h        |    3 +++
 apps/sbc/RegisterDialog.cpp |    4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/apps/sbc/RateLimit.h b/apps/sbc/RateLimit.h
index 9bde6c7..c0d2182 100644
--- a/apps/sbc/RateLimit.h
+++ b/apps/sbc/RateLimit.h
@@ -28,6 +28,9 @@ public:
    * returns true if 'size' should be dropped
    */
   bool limit(unsigned int size);
+
+  /** Get last update timestamp (wheeltimer::wallclock ticks) */
+  u_int32_t getLastUpdate() { return last_update; }
 };
 
 #endif
diff --git a/apps/sbc/RegisterDialog.cpp b/apps/sbc/RegisterDialog.cpp
index 440ee78..4e46769 100644
--- a/apps/sbc/RegisterDialog.cpp
+++ b/apps/sbc/RegisterDialog.cpp
@@ -531,8 +531,8 @@ int RegisterDialog::onTxReply(const AmSipRequest& req, 
AmSipReply& reply,
 
   if(reply.code >= 200 && reply.code < 300) {
     flags |= SIP_FLAGS_NOCONTACT;
-    removeHeader(hdrs, SIP_HDR_EXPIRES);
-    removeHeader(hdrs, SIP_HDR_MIN_EXPIRES);
+    removeHeader(reply.hdrs, SIP_HDR_EXPIRES);
+    removeHeader(reply.hdrs, SIP_HDR_MIN_EXPIRES);
   }
 
   return AmBasicSipDialog::onTxReply(req,reply,flags);

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

Reply via email to