Module: sems Branch: sayer/1.4-dbreg-fork Commit: 5ad253c2102e8cd0cf1937b7bf4eba391b8c9930 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=5ad253c2102e8cd0cf1937b7bf4eba391b8c9930
Author: Stefan Sayer <[email protected]> Committer: Stefan Sayer <[email protected]> Date: Wed Mar 7 16:16:56 2012 +0100 b/f: db_reg_agent: when unregistering, don't remove reg for auth & provisional reply thanks to rfuchs for report --- apps/db_reg_agent/DBRegAgent.cpp | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/db_reg_agent/DBRegAgent.cpp b/apps/db_reg_agent/DBRegAgent.cpp index 8adc556..7aada69 100644 --- a/apps/db_reg_agent/DBRegAgent.cpp +++ b/apps/db_reg_agent/DBRegAgent.cpp @@ -830,10 +830,14 @@ void DBRegAgent::onSipReplyEvent(AmSipReplyEvent* ev) { } } - if (registration->getUnregistering()) { - registrations_mut.unlock(); - removeRegistration(subscriber_id); - registrations_mut.lock(); + // skip provisional replies & auth + if (ev->reply.code >= 200 && !auth_pending) { + // remove unregistered + if (registration->getUnregistering()) { + registrations_mut.unlock(); + removeRegistration(subscriber_id); + registrations_mut.lock(); + } } if (!delete_status) { _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
