You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2014/05/22 20:30:15 UTC

git commit: TS-2793 - fix compile errors.

Repository: trafficserver
Updated Branches:
  refs/heads/master 174ae6777 -> fba9b2e36


TS-2793 - fix compile errors.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/fba9b2e3
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/fba9b2e3
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/fba9b2e3

Branch: refs/heads/master
Commit: fba9b2e36f4c12fec1586a4135d477ee0b7008d7
Parents: 174ae67
Author: Alan M. Carroll <am...@network-geographics.com>
Authored: Thu May 22 11:29:29 2014 -0700
Committer: Alan M. Carroll <am...@network-geographics.com>
Committed: Thu May 22 11:29:53 2014 -0700

----------------------------------------------------------------------
 proxy/http/HttpProxyServerMain.cc | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fba9b2e3/proxy/http/HttpProxyServerMain.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpProxyServerMain.cc b/proxy/http/HttpProxyServerMain.cc
index b770a8f..f5a64df 100644
--- a/proxy/http/HttpProxyServerMain.cc
+++ b/proxy/http/HttpProxyServerMain.cc
@@ -171,21 +171,19 @@ MakeHttpProxyAcceptor(HttpProxyAcceptor& acceptor, HttpProxyPort& port, unsigned
   // XXX the protocol probe should be a configuration option.
 
   ProtocolProbeSessionAccept *probe = NEW(new ProtocolProbeSessionAccept());
-  HttpSessionAccept *http = NEW(new HttpSessionAccept(accept_opt));
+  HttpSessionAccept *http = 0; // don't allocate this unless it will be used.
 
   if (port.m_session_protocol_preference.intersects(HTTP_PROTOCOL_SET)) {
+    http = NEW(new HttpSessionAccept(accept_opt));
     probe->registerEndpoint(ProtocolProbeSessionAccept::PROTO_HTTP, http);
   }
 
 #if TS_HAS_SPDY
   if (port.m_session_protocol_preference.intersects(SPDY_PROTOCOL_SET)) {
-    probe->registerEndpoint(ProtocolProbeSessionAccept::PROTO_SPDY, NEW(new SpdySessionAccept(SpdySessionAccept::SPDY_VERSION_3_1));
+    probe->registerEndpoint(ProtocolProbeSessionAccept::PROTO_SPDY, NEW(new SpdySessionAccept(SpdySessionAccept::SPDY_VERSION_3_1)));
   }
-
-  probe->registerEndpoint(TS_PROTO_SPDY, spdy31);
 #endif
 
-
   if (port.isSSL()) {
     SSLNextProtocolAccept *ssl = NEW(new SSLNextProtocolAccept(probe));
 
@@ -208,11 +206,11 @@ MakeHttpProxyAcceptor(HttpProxyAcceptor& acceptor, HttpProxyPort& port, unsigned
     // SPDY
 #if TS_HAS_SPDY
     if (port.m_session_protocol_preference.contains(TS_NPN_PROTOCOL_INDEX_SPDY_3)) {
-      ssl->registerEndpoint(TS_NPN_PROTOCOL_SPDY_3, NEW(new SpdySessionAccept(SpdySessionAccept::SPDY_VERSION_3));
+      ssl->registerEndpoint(TS_NPN_PROTOCOL_SPDY_3, NEW(new SpdySessionAccept(SpdySessionAccept::SPDY_VERSION_3)));
     }
 
     if (port.m_session_protocol_preference.contains(TS_NPN_PROTOCOL_INDEX_SPDY_3_1)) {
-      ssl->registerEndpoint(TS_NPN_PROTOCOL_SPDY_3_1, NEW(new SpdySessionAccept(SpdySessionAccept::SPDY_VERSION_3_1));
+      ssl->registerEndpoint(TS_NPN_PROTOCOL_SPDY_3_1, NEW(new SpdySessionAccept(SpdySessionAccept::SPDY_VERSION_3_1)));
     }
 #endif