[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-server-cvs
Subject:    [Server-cvs] protocol/rtsp transportparams.cpp,1.16,1.17
From:       dcollins () helixcommunity ! org
Date:       2007-10-30 23:45:27
Message-ID: 200710302345.l9UNjdSg015405 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/server/protocol/rtsp
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv2108

Modified Files:
	transportparams.cpp 
Log Message:
Synopsis
========
Fixes CAs related to RTSPTransportInstantiator

Branches: HEAD
Suggested Reviewer: Sean (already checked in)


Description
===========

In both RTSPTransportInstantiator::SetupTransportTNGTcpRDTTcp() and
RTSPTransportInstantiator::SetupTransportRTPTcp() we call into the
CHXRTSPTranSocket object constructor passing m_pBaseProt->m_pSock.
However, if this socket pointer is null we will CA.

Below is a sample stack:

t@17 (l@17) signal SEGV (no mapping at the fault address) in \
CHXRTSPTranSocket::CHXRTSPTranSocket at line 64 in file "chxrtsptransocket.cpp"  64   \
m_pSock->AddRef(); (dbx) where
current thread: t@17
=>[1] CHXRTSPTranSocket::CHXRTSPTranSocket(this = 0x663ac108, pSocket = (nil)), line \
64 in "chxrtsptransocket.cpp"  [2] \
RTSPTransportInstantiator::SetupTransportRTPTcp(this = 0x6d4780f8, pSession = \
0x44dae870, pStreamInfo = 0x52ed53c0, usStreamNumber = 0), line 2078 in \
"transportparams.cpp"  [3] CRTSPBaseProtocol::_FinishCommon(this = 0x454de8b8, \
pSession = 0x44dae870, pStreamInfo = 0x52ed53c0, usStream = 0, usType = 1U), line \
8107 in "crtspbase.cpp"  [4] CRTSPBaseProtocol::_FinishSetup(this = 0x454de8b8, \
usStreamNumber = 0, pcSessionID = 0x44662960 "12278-1"), line 7899 in "crtspbase.cpp" \
[5] CRTSPBaseProtocol::_SendStreamSetupResponse(this = 0x454de8b8, status = 0, \
pSessionID = 0x545ad4f0 "12278-1", pFileHeader = 0x51569eb0, pStreams = 0x397fa384, \
pOptionalValues = 0x64fe08c0, pResponseHeaders = 0x465cb314), line 12621 in \
"crtspbase.cpp"  [6] CRTSPBaseProtocol::SendSetupStreamResponse(this = 0x454de8b8, \
status = 0, pSessionCurrent = 0x44b88fa0, pIHXValuesFileHeader = 0x51569eb0, \
pCHXSimpleListStreamHeaders = 0x397fa384, pIHXValuesOptional = 0x64fe08c0, \
pIHXValuesResponse = 0x465cb314), line 12191 in "crtspbase.cpp"  [7] \
CRTSPBaseProtocol::setupStreams(this = 0x454de8b8, pHeaders = 0x397fa384, pSession = \
0x44b88fa0, status = 0), line 13548 in "crtspbase.cpp"  [8] \
ClientSession::SessionStreamHeaderReady(this = 0x44b88fa0, status = 0, pStreamHeader \
= 0x519c4518, pConvertedHeader = (nil)), line 1335 in "clientsession.cpp" [...]



Files Affected
==============

server/protocol/rtsp/transportparams.cpp


Testing Performed
=================

Unit Tests:
* None

Integration Tests:
* Proxy uptime test.

Leak Tests:
* None

Performance Tests:
* None

Platforms Tested: sunos-5.10-sparc-server
Build verified: sunos-5.10-sparc-server


QA Hints
===============

* Regress with new proxy uptimes.



Index: transportparams.cpp
===================================================================
RCS file: /cvsroot/server/protocol/rtsp/transportparams.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- transportparams.cpp	22 Oct 2007 18:04:23 -0000	1.16
+++ transportparams.cpp	30 Oct 2007 23:45:25 -0000	1.17
@@ -1819,6 +1819,11 @@
 {
     HX_RESULT rc = HXR_OK;
 
+    if (!m_pBaseProt->m_pSock)
+    {
+        return HXR_FAIL;
+    }
+
     if (pSession->m_sSetupCount == 1)
     {
         IHXSocket* pSock = new CHXRTSPTranSocket(m_pBaseProt->m_pSock);
@@ -2067,6 +2072,11 @@
 {
     HX_RESULT rc = HXR_OK;
 
+    if (!m_pBaseProt->m_pSock)
+    {
+        return HXR_FAIL;
+    }
+
     /*
      *  Don't reuse a tranport obj
      */


_______________________________________________
Server-cvs mailing list
Server-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/server-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic