You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2015/01/22 05:14:45 UTC

trafficserver git commit: TS-2715 Fix some ESI compile warnings

Repository: trafficserver
Updated Branches:
  refs/heads/4.2.x 7b4c41112 -> 55ddb12bb


TS-2715 Fix some ESI compile warnings

(cherry picked from commit 1e6b4194e80a99e9d9b9ede0a66611209b52c178)

Conflicts:
	CHANGES


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

Branch: refs/heads/4.2.x
Commit: 55ddb12bbb568bd08cc958b77f90c1c1f8d40281
Parents: 7b4c411
Author: Leif Hedstrom <zw...@apache.org>
Authored: Mon Apr 14 13:51:11 2014 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Wed Jan 21 20:59:29 2015 -0700

----------------------------------------------------------------------
 CHANGES                                 |  3 +++
 plugins/experimental/esi/lib/EsiGzip.cc | 12 ------------
 plugins/experimental/esi/lib/gzip.cc    | 12 ------------
 plugins/experimental/esi/lib/gzip.h     | 14 ++++++++++++++
 4 files changed, 17 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/55ddb12b/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 13cb4d2..b0750b7 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 4.2.3
 
+  *) [TS-2715] Fix some ESI compile warnings, change the constants to
+   be part of an include.
+
   *) [TS-3283] Certain SSL handshake error during client-hello hangs the client and
    leaves network connection open.
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/55ddb12b/plugins/experimental/esi/lib/EsiGzip.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/esi/lib/EsiGzip.cc b/plugins/experimental/esi/lib/EsiGzip.cc
index 312ed30..c7d5534 100644
--- a/plugins/experimental/esi/lib/EsiGzip.cc
+++ b/plugins/experimental/esi/lib/EsiGzip.cc
@@ -29,18 +29,6 @@
 using std::string;
 using namespace EsiLib;
 
-static const int COMPRESSION_LEVEL = 6;
-static const int ZLIB_MEM_LEVEL = 8;
-
-static const int GZIP_HEADER_SIZE = 10;
-static const int GZIP_TRAILER_SIZE = 8;
-
-static const char MAGIC_BYTE_1 = 0x1f;
-static const char MAGIC_BYTE_2 = 0x8b;
-static const char OS_TYPE = 3; // Unix
-
-static const int BUF_SIZE = 1 << 15; // 32k buffer
-
 EsiGzip::EsiGzip(const char *debug_tag,
                            ComponentBase::Debug debug_func, ComponentBase::Error error_func)
   : ComponentBase(debug_tag, debug_func, error_func),

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/55ddb12b/plugins/experimental/esi/lib/gzip.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/esi/lib/gzip.cc b/plugins/experimental/esi/lib/gzip.cc
index 5be1be4..9a38ce4 100644
--- a/plugins/experimental/esi/lib/gzip.cc
+++ b/plugins/experimental/esi/lib/gzip.cc
@@ -31,18 +31,6 @@
 using namespace EsiLib;
 using std::string;
 
-static const int COMPRESSION_LEVEL = 6;
-static const int ZLIB_MEM_LEVEL = 8;
-
-static const int GZIP_HEADER_SIZE = 10;
-static const int GZIP_TRAILER_SIZE = 8;
-
-static const char MAGIC_BYTE_1 = 0x1f;
-static const char MAGIC_BYTE_2 = 0x8b;
-static const char OS_TYPE = 3; // Unix
-
-static const int BUF_SIZE = 1 << 15; // 32k buffer
-
 template<typename T>
 inline void append(string &out, T data) {
   for (unsigned int i = 0; i < sizeof(data); ++i) {

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/55ddb12b/plugins/experimental/esi/lib/gzip.h
----------------------------------------------------------------------
diff --git a/plugins/experimental/esi/lib/gzip.h b/plugins/experimental/esi/lib/gzip.h
index 92d81ec..13906b8 100644
--- a/plugins/experimental/esi/lib/gzip.h
+++ b/plugins/experimental/esi/lib/gzip.h
@@ -28,6 +28,20 @@
 #include <string>
 #include <list>
 
+// Defines for various GZIP constants
+static const int COMPRESSION_LEVEL = 6;
+static const int ZLIB_MEM_LEVEL = 8;
+
+static const int GZIP_HEADER_SIZE = 10;
+static const int GZIP_TRAILER_SIZE = 8;
+
+static const char MAGIC_BYTE_1 = 0x1f;
+static const char MAGIC_BYTE_2 = 0x8b;
+static const char OS_TYPE = 3; // Unix
+
+static const int BUF_SIZE = 1 << 15; // 32k buffer
+
+
 namespace EsiLib {
 
 struct ByteBlock {