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

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Wed Oct 12 22:39:59 2011 +0200

b/f: small timer mem leak when unregistering fails

---

 apps/db_reg_agent/DBRegAgent.cpp |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/apps/db_reg_agent/DBRegAgent.cpp b/apps/db_reg_agent/DBRegAgent.cpp
index aa87825..c2ee4ca 100644
--- a/apps/db_reg_agent/DBRegAgent.cpp
+++ b/apps/db_reg_agent/DBRegAgent.cpp
@@ -388,6 +388,7 @@ void DBRegAgent::createRegistration(long subscriber_id,
       registrations_mut.unlock();
       WARN("registration with ID %ld already exists, removing\n", 
subscriber_id);
       removeRegistration(subscriber_id);
+      clearRegistrationTimer(subscriber_id);
       registrations_mut.lock();
     }
 
@@ -822,6 +823,12 @@ void DBRegAgent::onSipReplyEvent(AmSipReplyEvent* ev) {
        }
       }
 
+      if (registration->getUnregistering()) {
+       registrations_mut.unlock();
+       removeRegistration(subscriber_id);
+       registrations_mut.lock();
+      }
+
       if (!delete_status) {
        if (auth_pending && !save_auth_replies) {
          DBG("not updating DB with auth reply %u %s\n",

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

Reply via email to