Module: sems Branch: master Commit: 38a3109950d94bcec96110a70aa8dce820a01c31 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=38a3109950d94bcec96110a70aa8dce820a01c31
Author: Stefan Sayer <[email protected]> Committer: Stefan Sayer <[email protected]> Date: Wed Jun 22 15:13:25 2011 +0200 b/f: don't change OA state to completed in early dialog if OA state is changed to completed already when early media SDP received, final SDP received will be seen as another offer --- core/AmSipDialog.cpp | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/core/AmSipDialog.cpp b/core/AmSipDialog.cpp index 90535e3..329f07f 100644 --- a/core/AmSipDialog.cpp +++ b/core/AmSipDialog.cpp @@ -239,7 +239,8 @@ void AmSipDialog::onRxRequest(const AmSipRequest& req) int AmSipDialog::onRxSdp(const string& body, const char** err_txt) { - DBG("entering onRxSdp()\n"); + DBG("entering onRxSdp(), oa_state=%s\n", getOAStatusStr(oa_state)); + OAState old_oa_state = oa_state; int err_code = 0; assert(err_txt); @@ -262,10 +263,15 @@ int AmSipDialog::onRxSdp(const string& body, const char** err_txt) break; case OA_OfferSent: - oa_state = OA_Completed; + if (getStatus() != AmSipDialog::Early) + oa_state = OA_Completed; if(hdl->onSdpCompleted(sdp_local, sdp_remote)){ - err_code = 500; - *err_txt = "internal error"; + if (getStatus() != AmSipDialog::Early) { + err_code = 500; + *err_txt = "internal error"; + } else { + WARN("ignoring failed onSdpCompleted for early dialog SDP\n"); + } } break; @@ -284,6 +290,8 @@ int AmSipDialog::onRxSdp(const string& body, const char** err_txt) oa_state = OA_None; } + DBG("oa_state: %s -> %s\n", getOAStatusStr(old_oa_state), getOAStatusStr(oa_state)); + return err_code; } _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
