Repository: trafficserver
Updated Branches:
  refs/heads/master 638db6228 -> c33020e6a


Remove obsolete TSClientProtoStackCreate


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

Branch: refs/heads/master
Commit: c33020e6a9caedcc65fcba1e2ff68341b51df1a3
Parents: 638db62
Author: Leif Hedstrom <zw...@apache.org>
Authored: Thu May 22 13:27:24 2014 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Thu May 22 15:14:14 2014 -0600

----------------------------------------------------------------------
 proxy/InkAPI.cc     | 38 --------------------------------------
 proxy/InkAPITest.cc | 28 ----------------------------
 2 files changed, 66 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c33020e6/proxy/InkAPI.cc
----------------------------------------------------------------------
diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index 00c1469..429a47a 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -6043,44 +6043,6 @@ TSHttpAltInfoQualitySet(TSHttpAltInfo infop, float 
quality)
   info->m_qvalue = quality;
 }
 
-# if 0
-TSClientProtoStack
-TSClientProtoStackCreate(TSProtoType ptype, ...)
-{
-  unsigned  pstack = 0;
-  va_list   args;
-  const int pmax = (sizeof(TSClientProtoStack) * CHAR_BIT) - 1;
-
-  if (ptype == TS_PROTO_NULL || ptype > pmax) {
-    return 0;
-  }
-
-  pstack |= (1u << ptype);
-
-  va_start(args, ptype);
-  for (;;) {
-    ptype = (TSProtoType)va_arg(args, int);
-
-    // TS_PROTO_NULL ends the list.
-    if (ptype == TS_PROTO_NULL) {
-      va_end(args);
-      return pstack;
-    }
-
-    // Protocol stack value is out of range.
-    if (ptype > pmax) {
-      va_end(args);
-      return 0;
-    }
-
-    pstack |= (1u << ptype);
-  }
-
-  // We can't get here.
-  ink_release_assert(0);
-}
-# endif
-
 extern HttpSessionAccept *plugin_http_accept;
 extern HttpSessionAccept *plugin_http_transparent_accept;
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c33020e6/proxy/InkAPITest.cc
----------------------------------------------------------------------
diff --git a/proxy/InkAPITest.cc b/proxy/InkAPITest.cc
index b233d35..849ce78 100644
--- a/proxy/InkAPITest.cc
+++ b/proxy/InkAPITest.cc
@@ -7665,31 +7665,3 @@ REGRESSION_TEST(SDK_API_DEBUG_NAME_LOOKUPS) 
(RegressionTest * test, int /* atype
 
   return;
 }
-
-
-# if 0
-////////////////////////////////////////////////
-// SDK_API_PROTO_STACK_CREATE
-//
-// Unit Test for API: TSClientProtoStackCreate
-////////////////////////////////////////////////
-
-REGRESSION_TEST(SDK_API_TSClientProtoStackCreate)(RegressionTest * t, int /* 
atype ATS_UNUSED */, int * pstatus)
-{
-  TestBox box(t, pstatus);
-
-  box = REGRESSION_TEST_PASSED;
-
-#define CHECK(expr, expected) do {  \
-  TSClientProtoStack ps = (expr); \
-  box.check(ps == expected, "%s: received %u, expected %u", #expr, 
(unsigned)ps, (unsigned)expected); \
-} while(0)
-
- CHECK(TSClientProtoStackCreate(TS_PROTO_NULL), 0);
- CHECK(TSClientProtoStackCreate((TSProtoType)99, TS_PROTO_NULL), 0);
- CHECK(TSClientProtoStackCreate(TS_PROTO_SPDY, (TSProtoType)99, 
TS_PROTO_NULL), 0);
- CHECK(TSClientProtoStackCreate(TS_PROTO_UDP, TS_PROTO_NULL), 1);
- CHECK(TSClientProtoStackCreate(TS_PROTO_UDP, TS_PROTO_TCP, TS_PROTO_NULL), 3);
-
-}
-# endif

Reply via email to