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

List:       helix-server-cvs
Subject:    [Server-cvs] protocol/rtsp crtspbase.cpp,1.108,1.109
From:       ryuan () helixcommunity ! org
Date:       2012-08-31 10:22:55
[Download RAW message or body]

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


Modified Files:
	crtspbase.cpp 
Log Message:
Synopsis:
=========
Fixes Bug 270656 Uptime: CAs in CRTSPBaseProtocol::AddSession() and \
CRTSPBaseProtocol::AddSession() after start the RTSP clients

Branches: SERVER_15_0, head
Suggested Reviewers: James, Xiaocheng and Anyone

Description:
============
Refer the bug description.

Fix:
Add some check in the function to avoid CA.

Files affected:
===============
server/protocol/rtsp/crtspbase.cpp
server-restricted/protocol/http-ctrl/baseswitchhandler.cpp

Testing Performed:
================
Unit Tests:
LCT test.

Integration Tests:
None

Leak Tests: None
Performance Tests: N/A

Platforms Tested: win-x86_64-vc10.
Builds Verified: win-x86_64-vc10.

QA Hints
========
None.



Index: crtspbase.cpp
===================================================================
RCS file: /cvsroot/server/protocol/rtsp/crtspbase.cpp,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -d -r1.108 -r1.109
--- crtspbase.cpp	30 Aug 2012 10:33:27 -0000	1.108
+++ crtspbase.cpp	31 Aug 2012 10:22:47 -0000	1.109
@@ -8041,7 +8041,17 @@
     UINT16 nStreams = pHeaders->GetCount();
     HX_RESULT retVal = HXR_OK;
 
+    if(!m_pSock)
+    {
+        return HXR_UNEXPECTED;
+    }
+
     RTSPServerSession* pSession = GetSession(pcSessionID);
+    if(!pSession)
+    {
+        return HXR_UNEXPECTED;
+    }
+    
     pSession->m_uStreamCount = nStreams;
     pSession->clearStreamInfoList();
     pSession->m_ppStreamInfo = new RTSPStreamInfo*[nStreams];
@@ -8521,13 +8531,14 @@
             pInfo->m_ulRtpRSBitRate = ulRSRate;
 
             // Keep a copy of the stream headers so that PLAY
-            // requests can send 3gp required headers if available.
+            // requests can send 3gp required headers if available.            
             pInfo->m_pStreamHeader = ppValues[j];
             pInfo->m_pStreamHeader->AddRef();
 
             if (bHasTrackID && (!m_bIsProxy || m_bOriginUsesTrackID))
             {
                 pSession->m_bUseControlID = TRUE;
+
                 pInfo->m_ulControlID = ulTrackID;
             }
             else
@@ -8535,12 +8546,9 @@
                 pInfo->m_ulControlID = streamNumber;
             }
 
-            if(streamNumber < pSession->m_uStreamCount)
-            {
-                pSession->m_ppStreamInfo[streamNumber] = pInfo;
+            pSession->m_ppStreamInfo[streamNumber] = pInfo;
 
-                pSession->m_punNumASMRules[streamNumber] = unNumRules;
-            }
+            pSession->m_punNumASMRules[streamNumber] = unNumRules;
 
             if(ulDuration > ulMaxStreamDuration)
             {
@@ -8556,14 +8564,12 @@
             }
         }
 
-        if(streamNumber < pSession->m_uStreamCount)
+
+        for(int istr = 0; istr < streamNumber; istr++)
         {
-            for(int istr = 0; istr < streamNumber; istr++)
-            {
-                _RTSPStreamInfo *currStream = pSession->m_ppStreamInfo[istr];
-                m_ControlIDMap[currStream->m_ulControlID] = (void*)
-                        \
pSession->m_ppStreamInfo[pMaxBitrate[currStream->m_uStreamGroupNumber]]->m_ulControlID;
                
-            }
+            _RTSPStreamInfo *currStream = pSession->m_ppStreamInfo[istr];
+            m_ControlIDMap[currStream->m_ulControlID] = (void*)
+                    \
pSession->m_ppStreamInfo[pMaxBitrate[currStream->m_uStreamGroupNumber]]->m_ulControlID;
  }
         delete[] pMaxBitrate;
 


_______________________________________________
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