Module: sems Branch: master Commit: 6d63111b031242e41142c00bd29b331cf5bb8beb URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=6d63111b031242e41142c00bd29b331cf5bb8beb
Author: Stefan Sayer <[email protected]> Committer: Stefan Sayer <[email protected]> Date: Tue Sep 27 13:09:11 2011 +0200 b2bua: clear both call legs when shutting down server --- core/AmB2BSession.cpp | 8 ++++++++ core/AmB2BSession.h | 2 ++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/core/AmB2BSession.cpp b/core/AmB2BSession.cpp index 5715959..71e8653 100644 --- a/core/AmB2BSession.cpp +++ b/core/AmB2BSession.cpp @@ -1038,6 +1038,14 @@ void AmB2BCallerSession::onCancel(const AmSipRequest& req) terminateLeg(); } +void AmB2BCallerSession::onSystemEvent(AmSystemEvent* ev) { + if (ev->sys_event == AmSystemEvent::ServerShutdown) { + terminateOtherLeg(); + } + + AmB2BSession::onSystemEvent(ev); +} + void AmB2BCallerSession::onBye(const AmSipRequest& req) { if (rtp_relay_enabled) diff --git a/core/AmB2BSession.h b/core/AmB2BSession.h index 7e64b5e..d7e2db1 100644 --- a/core/AmB2BSession.h +++ b/core/AmB2BSession.h @@ -315,6 +315,8 @@ class AmB2BCallerSession: public AmB2BSession void onCancel(const AmSipRequest& req); void onBye(const AmSipRequest& req); + void onSystemEvent(AmSystemEvent* ev); + // @see AmB2BSession void terminateLeg(); void terminateOtherLeg(); _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
