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

List:       helix-server-cvs
Subject:    [Server-cvs] protocol/rtsp rtspmsg2.cpp,1.13.6.3,1.13.6.4
From:       dcollins () helixcommunity ! org
Date:       2008-03-27 23:01:39
Message-ID: 200803272301.m2RN1lYG025491 () mailer ! progressive-comp ! com
[Download RAW message or body]

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

Modified Files:
      Tag: SERVER_12
	rtspmsg2.cpp 
Log Message:
Synopsis
========
Fixes PR 214651: With clientside ABD 'ON", Playback doesn't start with
    passthrough Proxy and the Client transport is set to TCP.

Branches: SERVER_12_0_RN, SERVER_12_RN, SERVER_CURRENT_RN
Reviewer: Jamie


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

The RTSP response message text was being allocted using a CHXStaticBuffer
which referenced the read buffer.  In this scenario the buffer gets
overwritten resulting in garbage ABD data being interpreted as a text
string and passed to the client.  This resulted in playback failure.
In theory this was not really limited to ABD+TCP+PassThrough only, and
potentially other scenarios could trigger this condition as well.

By allocating this string with a CHXBuffer rather than a CHXStaticBuffer
the data integrity of the RTSP response reason text is retained, resulting
in a valid response message being passed on to the player.

In debugging this I found it highly useful to put custom data in the ABD
buffer so I could more easily see what was being extracted.  I found
the way it was defined cumbersome and changed the array of UINT32's
to be an array of bytes four times as long.  (They are read as bytes
anyhow.)  This part of the diff is not really part of the fix but is
both harmless and helpful so I will check this in while I'm at it.
There is no functional change here, just a differently-defined buffer
of garbage data for ABD to spew out.


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

server/protocol/rtsp/rtspmsg2.cpp
server/protocol/transport/rdt/pub/abdbuf.h

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

Unit Tests:
- None

Integration Tests:
- Ran the scenario from the PR with and without the changes to verify the fix.
- Verified TCP and UDP playback with caching enabled and disabled with realvideo10.rm.

Leak Tests:
- None

Performance Tests:
- None

Platforms Tested: linux-rhel4-i686
Build verified: linux-rhel4-i686


QA Hints
========

* Regress PR 214651.
* Validate other scenarios, especially those using ABD, play successfully.




Index: rtspmsg2.cpp
===================================================================
RCS file: /cvsroot/server/protocol/rtsp/rtspmsg2.cpp,v
retrieving revision 1.13.6.3
retrieving revision 1.13.6.4
diff -u -d -r1.13.6.3 -r1.13.6.4
--- rtspmsg2.cpp	19 Dec 2007 20:03:58 -0000	1.13.6.3
+++ rtspmsg2.cpp	27 Mar 2008 23:01:36 -0000	1.13.6.4
@@ -1858,8 +1858,7 @@
     }
     HX_ASSERT(psme->nCode == status);
 
-    m_pbufReason = new CHXStaticBuffer((UCHAR*)psme->szName,
-                                                      strlen(psme->szName));
+    m_pbufReason = new CHXStaticBuffer((UCHAR*)psme->szName, strlen(psme->szName));
     m_pbufReason->AddRef();
 
     return HXR_OK;
@@ -1955,7 +1954,7 @@
         *ppos += len;
         return RTSP_RES_INVALID;
     }
-    m_pbufReason = new CHXStaticBuffer(pbufPkt, pos, reasonlen);
+    m_pbufReason = new CHXBuffer(pcur, reasonlen);
     m_pbufReason->AddRef();
 
     *ppos += linelen;


_______________________________________________
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