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

List:       helix-server-cvs
Subject:    [Server-cvs] protocol/http httpprot.cpp,1.146.2.16,1.146.2.17
From:       mingda () helixcommunity ! org
Date:       2012-10-24 8:31:05
[Download RAW message or body]

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

Modified Files:
      Tag: SERVER_15_0
	httpprot.cpp 
Log Message:
Committed to : HEAD, SERVER_15_0_RN

Reviewed by: Xiaocheng Li, Richard Yuan

Verification Build:

Synopsis: 
===============
fix some possible memory leak

Branch: SERVER_15_0_RN, HEAD

Suggested Reviewers: Anyone

Description: 
===============
Fix potential memory leak

Files affected:
===============
server/protocol/http/httpprot.cpp


Testing Performed: 
===============
Integration Tests:
N/A

Performance Tests: 
N/A

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



Index: httpprot.cpp
===================================================================
RCS file: /cvsroot/server/protocol/http/httpprot.cpp,v
retrieving revision 1.146.2.16
retrieving revision 1.146.2.17
diff -u -d -r1.146.2.16 -r1.146.2.17
--- httpprot.cpp	4 Oct 2012 06:30:22 -0000	1.146.2.16
+++ httpprot.cpp	24 Oct 2012 08:30:52 -0000	1.146.2.17
@@ -725,13 +725,28 @@
     // If we already have a URL, log the previous URL before starting the next:
 
     IHXBuffer* pURL = pClipStats->GetURL();
-#ifdef HELIX_FEATURE_SERVER_MPEG2TS 
-    if(m_ulSegmentDuration)
+
+#ifdef HELIX_FEATURE_SERVER_DASH
+    if(!m_bIsDashgenReq)
     {
-        SetNPTEndTimeForHLS(pClipStats, (const char *)pURL->GetBuffer());
+#endif
+#ifdef HELIX_FEATURE_SERVER_MPEG2TS 
+        if(m_ulSegmentDuration)
+        {
+            SetNPTEndTimeForHLS(pClipStats, (const char *)pURL->GetBuffer());
+        }
+#endif
+#ifdef HELIX_FEATURE_SERVER_DASH
     }
+#endif
 
-    if (m_fileExt == TS_FILE_EXT && m_bTSConsolidatedLogging)
+
+#ifdef HELIX_FEATURE_SERVER_MPEG2TS 
+    if (
+#ifdef HELIX_FEATURE_SERVER_DASH 
+        !m_bIsDashgenReq &&
+#endif
+        (m_fileExt == TS_FILE_EXT && m_bTSConsolidatedLogging))
     {
         m_ulTSFileSizeSum += pClipStats->GetFileSize();
         //printf("HTTPProtocol::LogRequest: NOT LOGGING '%s'\n", pURL ? (const \
char*)pURL->GetBuffer() : ""); @@ -815,7 +830,7 @@
         m_bLastClip = TRUE;
         LogRequest();
     }
-    else if(m_fileExt == TS_FILE_EXT)
+    else if (m_fileExt == TS_FILE_EXT)
     {
         m_bLastClip = TRUE;
 
@@ -1040,8 +1055,15 @@
 
     if (pClient) 
     {
+#ifdef HELIX_FEATURE_SERVER_DASH
+        if (!m_bIsDashgenReq)
+        {
+#endif
 #ifdef HELIX_FEATURE_SERVER_MPEG2TS 
-        LogFinalTSRequest();
+            LogFinalTSRequest();
+#endif
+#ifdef HELIX_FEATURE_SERVER_DASH
+        }
 #endif
 #ifdef HELIX_FEATURE_SERVER_HTTP11
         if (m_bPersistantConnIDAdded && !m_bSessionLogSet)
@@ -1505,7 +1527,6 @@
 #ifdef HELIX_FEATURE_SERVER_MPEG2TS
     // Change the socket timeout if this is a MPEG2/TS request
     SetSocketTimeoutTS();
-
     /**
      * If the incoming request has QP then we need to append it to .ts request
      * and .m3u8 request (in case of uber playlists)
@@ -3732,7 +3753,8 @@
     Client* pClient = m_pDemux->GetClient();
     HX_ASSERT(pClient);
 
-    if (m_tRequestTag == HTTPMessage::T_GET && m_fileExt == TS_FILE_EXT && \
m_ulRegIndex == 0 && pClient)     +    if (m_tRequestTag == HTTPMessage::T_GET && \
(m_fileExt == TS_FILE_EXT || m_fileExt == DASH_MP4_FILE_EXT)  +        && \
m_ulRegIndex == 0 && pClient)      {
         IHXBuffer* pBuffer = NULL;
         char szBuffer[128];


_______________________________________________
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