From e005af4e12da187f23b95e5a4e343768038a5834 Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Tue, 29 Jul 2025 11:03:38 +0200 Subject: [PATCH] MT#63298 AmOfferAnswer: follow-up for f2c1db55a6a92ae Add missing parts of the PreviewCompleted state. Change-Id: I6a106c4da6984bbb7eafe90a0b618cb7726957a2 --- core/AmOfferAnswer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/AmOfferAnswer.cpp b/core/AmOfferAnswer.cpp index ad7b1a2d..8e0711f1 100644 --- a/core/AmOfferAnswer.cpp +++ b/core/AmOfferAnswer.cpp @@ -316,6 +316,8 @@ int AmOfferAnswer::onRxSdp(unsigned int m_cseq, const string& m_remote_tag, case OA_OfferSent: if(is_reliable) setState(OA_Completed); + else + setState(OA_PreviewCompleted); dlg->onSdpReceived(false); remote_tag = m_remote_tag; @@ -380,6 +382,9 @@ int AmOfferAnswer::onTxSdp(unsigned int m_cseq, bool is_reliable, if (is_reliable) { if (!force_no_sdp_update) setState(OA_Completed); + } else { + if (!force_no_sdp_update) + setState(OA_PreviewCompleted); } break; @@ -577,7 +582,7 @@ int AmOfferAnswer::onReplyOut(AmSipReply& reply, int &flags, AmMimeBody &ret_bod } } - if ((reply.code >= 300) && (reply.cseq == cseq)) { + if (reply.code >= 300 && reply.cseq == cseq) { /* final error reply -> cleanup OA state */ ILOG_DLG(L_DBG, "after %u reply to %s: resetting OA state\n", reply.code, reply.cseq_method.c_str()); clearTransitionalState();