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

List:       helix-server-cvs
Subject:    [Server-cvs] engine/session clientsession.cpp,1.72.2.6,1.72.2.7
From:       seansmith () helixcommunity ! org
Date:       2007-12-26 22:12:30
Message-ID: 200712262212.lBQMCcXh019093 () dommarcmx ! xen ! 10east ! com
[Download RAW message or body]

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


Modified Files:
      Tag: SERVER_12
	clientsession.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: clientsession.cpp
===================================================================
RCS file: /cvsroot/server/engine/session/clientsession.cpp,v
retrieving revision 1.72.2.6
retrieving revision 1.72.2.7
diff -u -d -r1.72.2.6 -r1.72.2.7
--- clientsession.cpp	18 Dec 2007 11:53:40 -0000	1.72.2.6
+++ clientsession.cpp	26 Dec 2007 22:12:27 -0000	1.72.2.7
@@ -460,6 +460,8 @@
                 pMDPShim->Done();
             }
         }
+
+        HX_RELEASE(pSource);
         HX_RELEASE(m_pBaseShim);
     }
     // when session terminated current and waiting switch if exist need to be \
deleted


_______________________________________________
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