Module: sems Branch: 1.5 Commit: f9d8584f69546b0957b748aff3a3f358a7345b39 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=f9d8584f69546b0957b748aff3a3f358a7345b39
Author: Raphael Coeffic <[email protected]> Committer: Raphael Coeffic <[email protected]> Date: Thu Oct 4 11:47:38 2012 +0200 b/f: fixes uninitialized SDP body pointer In UAC calls using Offer-Answer negotiation, in case an offer less INVITE was sent by SEMS, the "sdp_body" pointer initialized at the beginning of the function would be NULL. --- core/AmOfferAnswer.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/core/AmOfferAnswer.cpp b/core/AmOfferAnswer.cpp index 6bf0b79..8f8ae6a 100644 --- a/core/AmOfferAnswer.cpp +++ b/core/AmOfferAnswer.cpp @@ -297,10 +297,11 @@ int AmOfferAnswer::onRequestOut(AmSipRequest& req) bool generate_sdp = sdp_body && !sdp_body->getLen(); bool has_sdp = sdp_body && sdp_body->getLen(); - if (!generate_sdp && !has_sdp && + if (!sdp_body && ((req.method == SIP_METH_PRACK) || (req.method == SIP_METH_ACK))) { generate_sdp = (state == OA_OfferRecved); + sdp_body = req.body.addPart(SIP_APPLICATION_SDP); } saveState(); _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
