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/06/18 17:59:21 UTC

[1/2] trafficserver git commit: TS-3705: Make CTYPE_LOCAL a first class citizen

Repository: trafficserver
Updated Branches:
  refs/heads/master 95d73fb2c -> 867ae89ec


TS-3705: Make CTYPE_LOCAL a first class citizen


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

Branch: refs/heads/master
Commit: d16d78c7895fed23ff7d471e0e55c555a8eccc69
Parents: 95d73fb
Author: Alan Scherger <al...@impossibleventures.com>
Authored: Tue May 12 14:06:16 2015 -0500
Committer: Phil Sorber <so...@apache.org>
Committed: Thu Jun 18 09:57:29 2015 -0600

----------------------------------------------------------------------
 doc/reference/configuration/icp.config.en.rst | 8 ++++----
 proxy/ICPConfig.cc                            | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d16d78c7/doc/reference/configuration/icp.config.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/configuration/icp.config.en.rst b/doc/reference/configuration/icp.config.en.rst
index 4757f37..11a57c0 100644
--- a/doc/reference/configuration/icp.config.en.rst
+++ b/doc/reference/configuration/icp.config.en.rst
@@ -5,9 +5,9 @@
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at
- 
+
    http://www.apache.org/licenses/LICENSE-2.0
- 
+
   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -37,7 +37,7 @@ Format
 Each line in the icp.config file contains the name and configuration
 information for a single ICP peer in the following format::
 
-    host : host_IP : peer_type : proxy_port : icp_port : MC_on : MC_IP : MC_TTL :
+    host : host_IP : ctype : proxy_port : icp_port : MC_on : MC_IP : MC_TTL :
 
 Each field is described in the following list.
 
@@ -58,6 +58,7 @@ Each field is described in the following list.
 
     -  1 to indicate an ICP parent cache
     -  2 to indicate an ICP sibling cache
+    -  3 to indicate an ICP local cache
 
 ``proxy_port``
     The port number of the TCP port used by the ICP peer for proxy
@@ -96,4 +97,3 @@ one parent, and one sibling.
     localhost:0.0.0.0:3:8080:3130:0:0.0.0.0:1
     host1:123.12.1.23:1:8080:3131:0:0.0.0.0:1
     host2:123.12.1.24:2:8080:3131:0:0.0.0.0:1
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d16d78c7/proxy/ICPConfig.cc
----------------------------------------------------------------------
diff --git a/proxy/ICPConfig.cc b/proxy/ICPConfig.cc
index cd56050..4de236d 100644
--- a/proxy/ICPConfig.cc
+++ b/proxy/ICPConfig.cc
@@ -46,7 +46,7 @@
 //    hostname (string)         -- hostname, used only if (host_ip_str == 0)
 //    host_ip_str (string)      -- decimal dot notation; if null get IP
 //                                   addresss via lookup on hostname
-//    ctype (int)               -- 1=Parent, 2=Sibling
+//    ctype (int)               -- 1=Parent, 2=Sibling, 3=local
 //    proxy_port (int)          -- TCP Port #
 //    icp_port (int)            -- UDP Port #
 //    multicast_member          -- 0=No 1=Yes
@@ -558,7 +558,7 @@ ICPConfiguration::icp_config_change_callback(void *data, void *value, int startu
   //  Each line is formatted as follows with ":" separator for each field
   //    - hostname (string)           -- Identifier for entry
   //    - host_ip_str (string)        -- decimal dot notation
-  //    - ctype (int)                 -- 1=Parent, 2=Sibling
+  //    - ctype (int)                 -- 1=Parent, 2=Sibling, 3=Local
   //    - proxy_port (int)            -- TCP Port #
   //    - icp_port (int)              -- UDP Port #
   //    - multicast_member            -- 0=No 1=Yes
@@ -666,7 +666,7 @@ ICPConfiguration::icp_config_change_callback(void *data, void *value, int startu
     *next++ = 0;
     if (cur != (next - 1)) {
       P[n]._ctype = atoi(cur);
-      if ((P[n]._ctype != PeerConfigData::CTYPE_PARENT) && (P[n]._ctype != PeerConfigData::CTYPE_SIBLING)) {
+      if ((P[n]._ctype != PeerConfigData::CTYPE_PARENT) && (P[n]._ctype != PeerConfigData::CTYPE_SIBLING) && (P[n]._ctype != PeerConfigData::CTYPE_LOCAL)) {
         RecSignalWarning(REC_SIGNAL_CONFIG_ERROR, "read icp.config, bad ctype, line %d", ln);
         error = 1;
         break;


[2/2] trafficserver git commit: TS-3705: clang-format

Posted by so...@apache.org.
TS-3705: clang-format

This closes #201


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

Branch: refs/heads/master
Commit: 867ae89ec3425b62786a19b282fc07a1165b6443
Parents: d16d78c
Author: Phil Sorber <so...@apache.org>
Authored: Thu Jun 18 09:57:08 2015 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Thu Jun 18 09:57:45 2015 -0600

----------------------------------------------------------------------
 proxy/ICPConfig.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/867ae89e/proxy/ICPConfig.cc
----------------------------------------------------------------------
diff --git a/proxy/ICPConfig.cc b/proxy/ICPConfig.cc
index 4de236d..6c84198 100644
--- a/proxy/ICPConfig.cc
+++ b/proxy/ICPConfig.cc
@@ -666,7 +666,8 @@ ICPConfiguration::icp_config_change_callback(void *data, void *value, int startu
     *next++ = 0;
     if (cur != (next - 1)) {
       P[n]._ctype = atoi(cur);
-      if ((P[n]._ctype != PeerConfigData::CTYPE_PARENT) && (P[n]._ctype != PeerConfigData::CTYPE_SIBLING) && (P[n]._ctype != PeerConfigData::CTYPE_LOCAL)) {
+      if ((P[n]._ctype != PeerConfigData::CTYPE_PARENT) && (P[n]._ctype != PeerConfigData::CTYPE_SIBLING) &&
+          (P[n]._ctype != PeerConfigData::CTYPE_LOCAL)) {
         RecSignalWarning(REC_SIGNAL_CONFIG_ERROR, "read icp.config, bad ctype, line %d", ln);
         error = 1;
         break;