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

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

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

Modified Files:
	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.160
retrieving revision 1.161
diff -u -d -r1.160 -r1.161
--- httpprot.cpp	9 Oct 2012 10:29:35 -0000	1.160
+++ httpprot.cpp	24 Oct 2012 08:46:19 -0000	1.161
@@ -709,13 +709,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() : ""); @@ -799,7 +814,7 @@
         m_bLastClip = TRUE;
         LogRequest();
     }
-    else if(m_fileExt == TS_FILE_EXT)
+    else if (m_fileExt == TS_FILE_EXT)
     {
         m_bLastClip = TRUE;
 
@@ -1024,8 +1039,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)
@@ -1489,7 +1511,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)
@@ -3716,7 +3737,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