[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-server-cvs
Subject: [Server-cvs] log/tmplgpln clientstats_log.cpp,1.41,1.41.40.1
From: svaidhya () helixcommunity ! org
Date: 2010-02-28 3:44:23
Message-ID: 201002280344.o1S3iNLv021966 () mailer ! progressive-comp ! com
[Download RAW message or body]
Update of /cvsroot/server/log/tmplgpln
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv17098
Modified Files:
Tag: SERVER_14_0
clientstats_log.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: clientstats_log.cpp
===================================================================
RCS file: /cvsroot/server/log/tmplgpln/clientstats_log.cpp,v
retrieving revision 1.41
retrieving revision 1.41.40.1
diff -u -d -r1.41 -r1.41.40.1
--- clientstats_log.cpp 15 Oct 2007 23:33:36 -0000 1.41
+++ clientstats_log.cpp 28 Feb 2010 03:44:20 -0000 1.41.40.1
@@ -1013,17 +1013,66 @@
if (m_eEvent != CSEVENT_CLIENT_DISCONNECT ||
!pClipStats || !pClipStats->GetEndFlag())
{
+ HXBOOL bLog = TRUE;
+
+ /** For persistant connections we log every request on ClipDone.
+ * Hence for ClientDisconnect event we should not be logging.
+ * The above holds true only for persistant connections, for \
normal + * connections we do log on CLIENT_DISCONNECT.
+ * The way we identigy persistant Connections, is by looking at \
Clip::URL; will be NULL + **/
+
+ if (m_eEvent == CSEVENT_CLIENT_DISCONNECT)
+ {
+ //Check if protocol is HTTP
+ IHXBuffer* pProtocol = NULL;
+ pProtocol = m_pClientStats->GetProtocol();
+ if (pProtocol &&
+ (!(strcmp((const char*)pProtocol->GetBuffer(),"HTTP")) ||
+ !(strcmp((const char*)pProtocol->GetBuffer(),"HTTPS"))))
+ {
+ IHXBuffer* pClipURL = NULL;
+ if (pClipStats)
+ {
+ pClipURL = pClipStats->GetURL(); \
+ if (!pClipURL)
+ {
+ //For HTTP persistent connections, if \
SessionEndFlag is true, + //then populate the \
Session Log + bLog = FALSE;
+
+ IHXSessionStats5* pSessionStats5 = NULL;
+ \
pSessionStats->QueryInterface(IID_IHXSessionStats5, (void **)&pSessionStats5); + \
if (pSessionStats5 && pSessionStats5->GetPersistantConnID() != 0) + \
{ + bLog = \
pSessionStats5->GetSessionEndFlag(); + if \
(bLog) + {
+ // For Session Log entry, We need to Log \
only Session Values. + \
HX_RELEASE(pClipStats); + }
+ }
+ HX_RELEASE(pSessionStats5);
+ }
+ HX_RELEASE(pClipURL);
+ }
+ }
+ HX_RELEASE(pProtocol);
+ }
+
+ if (bLog)
+ {
m_pStatsLog->DoOutput(pFormatToUse,
m_pClientStats,
pSessionStats,
pClipStats);
}
+ }
HX_RELEASE(pClipStats);
}
HX_RELEASE(pSessionStats);
}
}
-
return HXR_OK;
}
_______________________________________________
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