Module: sems
Branch: master
Commit: f7d1b406f8fc86916fcf1e38118dfa4ab148a9c4
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=f7d1b406f8fc86916fcf1e38118dfa4ab148a9c4

Author: Juha Heinanen <[email protected]>
Committer: Juha Heinanen <[email protected]>
Date:   Wed May  7 21:57:21 2014 +0300

core: sdp payload may be in multipart body

---

 core/AmOfferAnswer.cpp |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/core/AmOfferAnswer.cpp b/core/AmOfferAnswer.cpp
index d7a4e3c..390ec09 100644
--- a/core/AmOfferAnswer.cpp
+++ b/core/AmOfferAnswer.cpp
@@ -218,7 +218,14 @@ int AmOfferAnswer::onRxSdp(unsigned int m_cseq, const 
AmMimeBody& body, const ch
   int err_code = 0;
   assert(err_txt);
 
-  if(sdp_remote.parse((const char*)body.getPayload())){
+  const AmMimeBody *sdp = body.hasContentType("application/sdp");
+
+  if (sdp == NULL) {
+    err_code = 400;
+    *err_txt = "sdp body part not found";
+  }
+ 
+  if (sdp_remote.parse((const char*)sdp->getPayload())) {
     err_code = 400;
     *err_txt = "session description parsing failed";
   }

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to