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/09/25 17:30:25 UTC

git commit: Fix build errors, clang warnings.

Repository: trafficserver
Updated Branches:
  refs/heads/master 978f4090c -> 2ee3bcf2c


Fix build errors, clang warnings.


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

Branch: refs/heads/master
Commit: 2ee3bcf2cec23239e92fc3e9ef2740e9cd265ede
Parents: 978f409
Author: Alan M. Carroll <am...@apache.org>
Authored: Thu Sep 25 10:30:10 2014 -0500
Committer: Alan M. Carroll <am...@apache.org>
Committed: Thu Sep 25 10:30:10 2014 -0500

----------------------------------------------------------------------
 example/ssl-preaccept/ssl-preaccept.cc         |  1 -
 example/ssl-sni-whitelist/ssl-sni-whitelist.cc | 12 +++++++++++-
 iocore/net/SSLNetVConnection.cc                |  2 +-
 3 files changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2ee3bcf2/example/ssl-preaccept/ssl-preaccept.cc
----------------------------------------------------------------------
diff --git a/example/ssl-preaccept/ssl-preaccept.cc b/example/ssl-preaccept/ssl-preaccept.cc
index 9a9a7be..c67ba8c 100644
--- a/example/ssl-preaccept/ssl-preaccept.cc
+++ b/example/ssl-preaccept/ssl-preaccept.cc
@@ -11,7 +11,6 @@
 # include <inttypes.h>
 # include <ts/ts.h>
 # include <tsconfig/TsValue.h>
-# include <alloca.h>
 # include <ts/ink_inet.h>
 
 using ts::config::Configuration;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2ee3bcf2/example/ssl-sni-whitelist/ssl-sni-whitelist.cc
----------------------------------------------------------------------
diff --git a/example/ssl-sni-whitelist/ssl-sni-whitelist.cc b/example/ssl-sni-whitelist/ssl-sni-whitelist.cc
index 24ffa15..1ef5275 100644
--- a/example/ssl-sni-whitelist/ssl-sni-whitelist.cc
+++ b/example/ssl-sni-whitelist/ssl-sni-whitelist.cc
@@ -8,8 +8,8 @@
 # include <memory.h>
 # include <inttypes.h>
 # include <ts/ts.h>
+# include <ink_config.h>
 # include <tsconfig/TsValue.h>
-# include <alloca.h>
 # include <openssl/ssl.h>
 
 using ts::config::Configuration;
@@ -18,6 +18,8 @@ using ts::config::Value;
 # define PN "ssl-sni-whitelist"
 # define PCP "[" PN " Plugin] "
 
+# if TS_USE_TLS_SNI
+
 namespace {
 
 std::string ConfigPath;
@@ -139,3 +141,11 @@ TSPluginInit(int argc, const char *argv[]) {
   return;
 }
 
+# else // ! TS_USE_TLS_SNI
+
+void
+TSPluginInit(int, const char *[]) {
+    TSError(PCP "requires TLS SNI which is not available.");
+}
+
+# endif // TS_USE_TLS_SNI

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2ee3bcf2/iocore/net/SSLNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index 56e6d0a..55fbbe8 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -912,7 +912,7 @@ SSLNetVConnection::sslServerHandShakeEvent(int &err)
     // raw handshake data before calling the ssl accept calls.
     int64_t data_read;
     if ((data_read = this->read_raw_data()) > 0) {
-      data_to_read = BIO_get_mem_data(SSL_get_rbio(this->ssl), &data_ptr);
+      BIO_get_mem_data(SSL_get_rbio(this->ssl), &data_ptr);
     }
   }