Module: sems Branch: rco/offer_answer Commit: c158452061ca4530586fb6ca008478748c21827f URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=c158452061ca4530586fb6ca008478748c21827f
Author: Raphael Coeffic <[email protected]> Committer: Raphael Coeffic <[email protected]> Date: Fri Apr 15 17:17:10 2011 +0200 restore previous dlg status if onTxSdp() fails. --- core/AmSipDialog.cpp | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/AmSipDialog.cpp b/core/AmSipDialog.cpp index 6fb648c..b421c84 100644 --- a/core/AmSipDialog.cpp +++ b/core/AmSipDialog.cpp @@ -449,6 +449,7 @@ int AmSipDialog::onTxRequest(AmSipRequest& req) int AmSipDialog::onTxReply(AmSipReply& reply) { // update Dialog status + Status status_backup = status; switch(status){ case Connected: @@ -524,13 +525,12 @@ int AmSipDialog::onTxReply(AmSipReply& reply) } } + if (has_sdp && (onTxSdp(reply.body) != 0)) { - DBG("onTxSdp() failed (replying 500 internal error)\n"); - reply.code = 500; - reply.reason = "internal error"; - reply.body = ""; - reply.content_type = ""; + DBG("onTxSdp() failed\n"); + status = status_backup; + return -1; } if ((reply.code >= 200) && _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
