You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2010/10/31 22:59:43 UTC
svn commit: r1029502 - in /trafficserver/traffic/trunk/proxy/http2:
HttpServerSession.cc HttpServerSession.h
Author: zwoop
Date: Sun Oct 31 21:59:43 2010
New Revision: 1029502
URL: http://svn.apache.org/viewvc?rev=1029502&view=rev
Log:
Small cleanup from bad indentation from indent.
Modified:
trafficserver/traffic/trunk/proxy/http2/HttpServerSession.cc
trafficserver/traffic/trunk/proxy/http2/HttpServerSession.h
Modified: trafficserver/traffic/trunk/proxy/http2/HttpServerSession.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpServerSession.cc?rev=1029502&r1=1029501&r2=1029502&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpServerSession.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpServerSession.cc Sun Oct 31 21:59:43 2010
@@ -39,24 +39,6 @@
static int64 next_ss_id = (int64) 0;
ClassAllocator<HttpServerSession> httpServerSessionAllocator("httpServerSessionAllocator");
-enum
-{
- HTTP_SS_MAGIC_ALIVE = 0x0123FEED,
- HTTP_SS_MAGIC_DEAD = 0xDEADFEED
-};
-
-HttpServerSession::HttpServerSession():
-VConnection(NULL),
-server_ip(0), server_port(0), hostname_hash(),
-host_hash_computed(false), con_id(0), transact_count(0),
-state(HSS_INIT), to_parent_proxy(false), server_trans_stat(0),
-private_session(false),
-enable_origin_connection_limiting(false),
-connection_count(NULL),
-read_buffer(NULL), server_vc(NULL), magic(HTTP_SS_MAGIC_DEAD), buf_reader(NULL)
-{
-}
-
void
HttpServerSession::destroy()
{
@@ -84,7 +66,6 @@ HttpServerSession::allocate()
void
HttpServerSession::new_connection(NetVConnection * new_vc)
{
-
ink_assert(new_vc != NULL);
server_vc = new_vc;
@@ -106,8 +87,7 @@ HttpServerSession::new_connection(NetVCo
if(connection_count == NULL)
connection_count = ConnectionCount::getInstance();
connection_count->incrementCount(server_ip);
- Debug("http_ss", "[%lld] new connection, ip: %u, count: %u",
- con_id, server_ip, connection_count->getCount(server_ip));
+ Debug("http_ss", "[%lld] new connection, ip: %u, count: %u", con_id, server_ip, connection_count->getCount(server_ip));
}
#ifdef LAZY_BUF_ALLOC
read_buffer = new_empty_MIOBuffer(HTTP_SERVER_RESP_HDR_BUFFER_INDEX);
@@ -144,6 +124,7 @@ HttpServerSession::do_io_close(int alerr
HTTP_DECREMENT_DYN_STAT(http_current_server_transactions_stat);
this->server_trans_stat--;
}
+
server_vc->do_io_close(alerrno);
Debug("http_ss", "[%lld] session closed", con_id);
server_vc = NULL;
Modified: trafficserver/traffic/trunk/proxy/http2/HttpServerSession.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpServerSession.h?rev=1029502&r1=1029501&r2=1029502&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpServerSession.h (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpServerSession.h Sun Oct 31 21:59:43 2010
@@ -52,24 +52,34 @@ class HttpSM;
class MIOBuffer;
class IOBufferReader;
-enum HSS_State
-{
+enum HSS_State {
HSS_INIT,
HSS_ACTIVE,
HSS_KA_CLIENT_SLAVE,
- HSS_KA_SHARED
+ HSS_KA_SHARED
+};
+
+enum {
+ HTTP_SS_MAGIC_ALIVE = 0x0123FEED,
+ HTTP_SS_MAGIC_DEAD = 0xDEADFEED
};
-class HttpServerSession:public VConnection
+class HttpServerSession : public VConnection
{
public:
- HttpServerSession();
- void destroy();
+ HttpServerSession()
+ : VConnection(NULL),
+ server_ip(0), server_port(0), hostname_hash(),
+ host_hash_computed(false), con_id(0), transact_count(0),
+ state(HSS_INIT), to_parent_proxy(false), server_trans_stat(0),
+ private_session(false),
+ enable_origin_connection_limiting(false),
+ connection_count(NULL),
+ read_buffer(NULL), server_vc(NULL), magic(HTTP_SS_MAGIC_DEAD), buf_reader(NULL)
+ { }
-public:
+ void destroy();
static HttpServerSession *allocate();
-
-public:
void new_connection(NetVConnection * new_vc);
void reset_read_buffer(void)