From 98e12fce8783b44390ebc788e7e5cd2a4befd902 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Fri, 9 Jun 2006 09:18:13 +0000 Subject: [PATCH] * removed some unnecessary debug infos. * moved onOtherError to onOtherReply. git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@54 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- core/AmB2BSession.cpp | 11 ++++++----- core/AmB2BSession.h | 4 ++-- core/AmSession.cpp | 4 +--- core/AmSessionScheduler.cpp | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/core/AmB2BSession.cpp b/core/AmB2BSession.cpp index 086347bd..1de9e0de 100644 --- a/core/AmB2BSession.cpp +++ b/core/AmB2BSession.cpp @@ -146,14 +146,14 @@ void AmB2BSession::onOtherBye(const AmSipRequest& req) terminateLeg(); } -void AmB2BSession::onOtherError(const AmSipReply& reply) +void AmB2BSession::onOtherReply(const AmSipReply& reply) { - terminateLeg(); + if(reply.code >= 300) + terminateLeg(); } void AmB2BSession::terminateLeg() { - //clear_other(); setStopped(); dlg.bye(); } @@ -221,9 +221,10 @@ void AmB2BCallerSession::onB2BEvent(B2BEvent* ev) reinviteCaller(reply); } else { - - onOtherError(reply); + terminateOtherLeg(); } + + onOtherReply(reply); break; default: diff --git a/core/AmB2BSession.h b/core/AmB2BSession.h index b7f182a4..3702daea 100644 --- a/core/AmB2BSession.h +++ b/core/AmB2BSession.h @@ -109,8 +109,8 @@ protected: // Other leg received a BYE virtual void onOtherBye(const AmSipRequest& req); - // INVITE from other leg failed - virtual void onOtherError(const AmSipReply& reply); + // INVITE from other leg has been replied + virtual void onOtherReply(const AmSipReply& reply); AmB2BSession() : sip_relay_only(true) diff --git a/core/AmSession.cpp b/core/AmSession.cpp index 56138f72..1362efd9 100644 --- a/core/AmSession.cpp +++ b/core/AmSession.cpp @@ -395,9 +395,7 @@ void AmSession::putDtmfAudio(const unsigned char *buf, int size, int user_ts) void AmSession::onDtmf(int event, int duration_msec) { -// if (dialog_st.get()) -// dialog_st->onDtmf(event, duration_msec); -// AmDialogState::onDtmf(event, duration_msec); + DBG("AmSession::onDtmf(%i,%i)\n",event,duration_msec); } void AmSession::clearAudio() diff --git a/core/AmSessionScheduler.cpp b/core/AmSessionScheduler.cpp index 2f58070d..5cb835f9 100644 --- a/core/AmSessionScheduler.cpp +++ b/core/AmSessionScheduler.cpp @@ -217,7 +217,7 @@ void AmSessionSchedulerThread::processAudio(unsigned int ts) if(s->rtp_str.checkInterval(ts)){ - DBG("ts = %u\n",ts); + //DBG("ts = %u\n",ts); int ret = s->rtp_str.receive(ts); if(ret < 0){ switch(ret){