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

List:       helix-server-cvs
Subject:    [Server-cvs] engine/inputsource ppmstaticshim.cpp, 1.14.2.3,
From:       seansmith () helixcommunity ! org
Date:       2007-12-26 22:12:29
Message-ID: 200712262212.lBQMCej0019096 () dommarcmx ! xen ! 10east ! com
[Download RAW message or body]

Update of /cvsroot/server/engine/inputsource
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv19267/server/engine/inputsource


Modified Files:
      Tag: SERVER_12
	ppmstaticshim.cpp 
Log Message:
Synopsis
========
Fixes leaks related to FCS packet shim.

Branches: HEAD, SERVER_12_RN
Reviewer: dcollins


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

Part A (the big one)
====================
CPPMStaticShim::PacketReady gets a packet and passes it to ParsePacket. ParsePacket \
gets the buffer from the packet (AddRef) and returns the pointer.

Back in ::PacketReady, the buffer is passed into ::AdjustTimeStamp which creates a \
new server RTP packet and initializes it with the buffer from the old packet.

The packet is passed to the sink (PPM), and is released. But in this move to transfer \
the buffer from one packet to the other, the buffer isn't released.

So every buffer out of every packet that goes through the shim is leaked. Even for \
low load uptimes, this is huge!


Part B (the small one)
======================

With FCS licensed, enabled, and a client requesting an URL with FCS
query params, the server creates a CPPMStaticShim object.

In ClientSession::Done(), the shim is QI'd for the IHXSourcePackets
interface, but the resulting reference isn't released. Fix is to release the \
reference.


Note: Tabs and spacing in the shim file are all hosed so I'm not going to even bother \
fixing them right now. But it is a big mess!

ctrl+k ctrl+f folks!


Files Affected
==============
server/engine/session/clientsession.cpp
server/engine/inputsource/ppmstaticshim.cpp


Testing Performed
=================
Unit Tests:
n/a

Integration Tests:
n/a

Leak Tests:
Verified via LCT that with fixes in place, server didn't leak buffers or \
CPPMStaticShim object on FCS enabled session.

Performance Tests:
n/a

Platforms Tested: win32-i386-vc7
Build verified: linux-rhel4-i686, win32-i386-vc7


QA Hints
========
n/a



Index: ppmstaticshim.cpp
===================================================================
RCS file: /cvsroot/server/engine/inputsource/ppmstaticshim.cpp,v
retrieving revision 1.14.2.3
retrieving revision 1.14.2.4
diff -u -d -r1.14.2.3 -r1.14.2.4
--- ppmstaticshim.cpp	17 Dec 2007 15:06:35 -0000	1.14.2.3
+++ ppmstaticshim.cpp	26 Dec 2007 22:12:26 -0000	1.14.2.4
@@ -218,6 +218,7 @@
                 HandleWirePayload(pBuffer, ulRTPCurTS,ucMarker);
         }
         pNewPacket = AdjustTimeStamp(pPacket, pBuffer);
+    HX_RELEASE(pBuffer);
         if (!pNewPacket)
         {
                 return HXR_UNEXPECTED;
@@ -233,7 +234,6 @@
         }
         HX_RELEASE(pNewPacket);
         return ulRet;
-        
 }
 
 void CPPMStaticShim::HandleWirePayload(IHXBuffer*& pBuffer, UINT32& ulRTPTime, \
UINT8& ucMarker)


_______________________________________________
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