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

Author: Václav Kubart <[email protected]>
Committer: Václav Kubart <[email protected]>
Date:   Mon Jun 18 16:32:16 2012 +0200

b/f: fixed crash when handling request without SDP body

The fix was not tested yet.

Thanks Peter Loeppky for report.

---

 core/AmB2BSession.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/AmB2BSession.cpp b/core/AmB2BSession.cpp
index 317694e..b1d417d 100644
--- a/core/AmB2BSession.cpp
+++ b/core/AmB2BSession.cpp
@@ -733,7 +733,7 @@ int AmB2BSession::relaySip(const AmSipRequest& req)
         (req.method == SIP_METH_INVITE || req.method == SIP_METH_UPDATE ||
          req.method == SIP_METH_ACK || req.method == SIP_METH_PRACK)) {
       body = req.body.hasContentType(SIP_APPLICATION_SDP);
-      if (updateLocalBody(*body, *r_body.hasContentType(SIP_APPLICATION_SDP))) 
{
+      if (body && updateLocalBody(*body, 
*r_body.hasContentType(SIP_APPLICATION_SDP))) {
         body = &r_body;
       }
       else {
@@ -1230,7 +1230,7 @@ void AmB2BCalleeSession::onB2BEvent(B2BEvent* ev)
     if (rtp_relay_mode == RTP_Relay) {
       try {
        body = co_ev->body.hasContentType(SIP_APPLICATION_SDP);
-       if (updateLocalBody(*body, 
*r_body.hasContentType(SIP_APPLICATION_SDP))) {
+       if (body && updateLocalBody(*body, 
*r_body.hasContentType(SIP_APPLICATION_SDP))) {
          body = &r_body;
        }
        else {

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

Reply via email to