[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-server-cvs
Subject: [Server-cvs] protocol/http httpprot.cpp,1.96,1.97
From: svaidhya () helixcommunity ! org
Date: 2010-02-28 3:43:18
Message-ID: 201002280343.o1S3hIfN021915 () mailer ! progressive-comp ! com
[Download RAW message or body]
Update of /cvsroot/server/protocol/http
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv16893
Modified Files:
httpprot.cpp
Log Message:
Synopsis
========
CR: Bug 258865: Connected_time always increments for proxy connections with \
LoggingStyle 8
Branch : SERVER_14_0_RN, HEAD
Suggested Reviewer: Anyone
Description
===========
With cached mode on proxy, when a file is first requested (not in cache), the proxy \
creates Session with the server and calls ClientSession::begin to download each \
chunk. Every time ::begin is called, the SessionStartTime is reset. Hence the \
connected_time, calculated on ClipDone, as CurrentTime - SessionStartTime, is wrongly \
calculated from the last time ::begin was called instead of first.
Fix: Don.t re-iniliaze SessionStartTime if already initialized.
Files Changed:
============
./server/emgine/session/clientsession.cpp
Testing Performed
=================
Unit Tests:
- None
Integration Tests:
-
Leak Tests:
- None.
Performance Tests:
- None
Build verified: win32-i386-vc7
Platform tested : win32-i386-vc7
Index: httpprot.cpp
===================================================================
RCS file: /cvsroot/server/protocol/http/httpprot.cpp,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- httpprot.cpp 24 Feb 2010 20:47:38 -0000 1.96
+++ httpprot.cpp 28 Feb 2010 03:43:15 -0000 1.97
@@ -148,6 +148,7 @@
, m_bFirstRequest(TRUE)
, m_ulClipStart(0)
, m_ulSessionStart(0)
+ , m_bPersistantConnIDAdded(FALSE)
#ifdef HELIX_FEATURE_SERVER_HTTP_ALLOW
, m_pHTTPAllow(NULL)
, m_eOnURLState(ONURL_INIT)
@@ -157,6 +158,7 @@
#endif //HELIX_FEATURE_SERVER_MPEG2TS
{
#ifdef HELIX_FEATURE_SERVER_HTTP11
+ m_bSessionLogSet = FALSE;
m_bUseChunkedEncoding = FALSE;
m_pMobileCheck = new HTTPMobileCheck();
m_pRange = new HTTPRange();
@@ -768,6 +770,12 @@
if (pClient)
{
+#ifdef HELIX_FEATURE_SERVER_HTTP11
+ if (m_bPersistantConnIDAdded && !m_bSessionLogSet)
+ {
+ SetSessionLogEntry();
+ }
+#endif
DecrHTTPClientCount();
if (pClient->m_bIsAProxy && pClient->m_pStats)
@@ -1639,8 +1647,6 @@
pSessionStats5->SetRange(pRange);
}
}
- UINT32 PersistantConnID = pClient->GetClientStats()->GetID();
- pSessionStats5->SetPersistantConnID(PersistantConnID);
}
HX_RELEASE(pSessionStats);
HX_RELEASE(pSessionStats5);
@@ -1852,6 +1858,12 @@
// call to OnClosed()).
if (pClient)
{
+#ifdef HELIX_FEATURE_SERVER_HTTP11
+ if (m_bPersistantConnIDAdded && !m_bSessionLogSet)
+ {
+ SetSessionLogEntry();
+ }
+#endif
pClient->OnClosed(status);
}
@@ -2032,6 +2044,26 @@
//Initialize
m_ulSessionStart = ulTicks;
m_ulClipStart = ulTicks;
+
+ if (pClient)
+ {
+ IHXSessionStats* pSessionStats = \
pClient->GetClientStats()->GetSession(1); + HX_ASSERT(pSessionStats);
+
+ IHXSessionStats5* pSessionStats5 = NULL;
+ pSessionStats->QueryInterface(IID_IHXSessionStats5, (void \
**)&pSessionStats5); + if (pSessionStats5)
+ {
+ if (m_bPersistentConnection && !m_bPersistantConnIDAdded)
+ {
+ UINT32 ulPersistantConnID = pClient->GetClientStats()->GetID();
+ pSessionStats5->SetPersistantConnID(ulPersistantConnID);
+ m_bPersistantConnIDAdded = TRUE;
+ }
+ }
+ HX_RELEASE(pSessionStats);
+ HX_RELEASE(pSessionStats5);
+ }
}
//Stores the time at which the request was received for every request
@@ -2623,6 +2655,39 @@
}
}
+#ifdef HELIX_FEATURE_SERVER_HTTP11
+void
+HTTPProtocol::SetSessionLogEntry()
+{
+ Client* pClient = NULL;
+ if (m_pDemux)
+ {
+ pClient = m_pDemux->GetClient();
+ }
+
+ if (pClient && !m_bSessionLogSet)
+ {
+ IHXSessionStats* pSessionStats = pClient->GetClientStats()->GetSession(1);
+ HX_ASSERT(pSessionStats);
+
+ IHXSessionStats5* pSessionStats5 = NULL;
+ pSessionStats->QueryInterface(IID_IHXSessionStats5, (void \
**)&pSessionStats5); + if (pSessionStats5)
+ {
+ pSessionStats5->SetSessionEndFlag(TRUE);
+ m_bSessionLogSet = TRUE;
+ }
+
+ IHXBuffer* pFinalClipURL = new ServerBuffer(TRUE);
+ pFinalClipURL->Set((UCHAR*)m_pURL,UINT32(strlen(m_pURL) + 1));
+ pSessionStats->SetURL(pFinalClipURL);
+
+ HX_RELEASE(pFinalClipURL);
+ HX_RELEASE(pSessionStats5);
+ HX_RELEASE(pSessionStats);
+ }
+}
+#endif
HXBOOL
HTTPProtocol::CheckForSecurePlaylist()
_______________________________________________
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