trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iga...@apache.org
Subject [2/2] git commit: TS-1987: replace ink_string_fast functions
Date Mon, 05 Aug 2013 19:42:48 GMT
TS-1987: replace ink_string_fast functions

with their standard libc equivalent.


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

Branch: refs/heads/master
Commit: 9533a4d37f3db280cd6ba47a7906bd21e1b49d3d
Parents: 87fce2a
Author: Igor Galić <i.galic@brainsware.org>
Authored: Mon Aug 5 21:40:51 2013 +0200
Committer: Igor Galić <i.galic@brainsware.org>
Committed: Mon Aug 5 21:40:51 2013 +0200

----------------------------------------------------------------------
 proxy/http/HttpTransactCache.cc |  8 ++++----
 proxy/http/remap/UrlRewrite.cc  | 38 ++++++++++++++++++------------------
 proxy/logging/LogFilter.cc      |  4 ++--
 3 files changed, 25 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9533a4d3/proxy/http/HttpTransactCache.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpTransactCache.cc b/proxy/http/HttpTransactCache.cc
index 6727aa3..b89dfa0 100644
--- a/proxy/http/HttpTransactCache.cc
+++ b/proxy/http/HttpTransactCache.cc
@@ -1186,10 +1186,10 @@ HttpTransactCache::CalcVariability(CacheLookupHttpConfig * http_config_params,
       Debug("http_match", "      type = '%s', subtype = '%s'", type, subtype);
 
       if (http_config_params->cache_enable_default_vary_headers) {
-        if (ink_string_fast_strcasecmp(type, "text") == 0) {
+        if (strcasecmp(type, "text") == 0) {
           Debug("http_match", "      Using default text vary headers");
           vary_values = http_config_params->cache_vary_default_text;
-        } else if (ink_string_fast_strcasecmp(type, "image") == 0) {
+        } else if (strcasecmp(type, "image") == 0) {
           Debug("http_match", "      Using default image vary headers");
           vary_values = http_config_params->cache_vary_default_images;
         } else {
@@ -1230,13 +1230,13 @@ HttpTransactCache::CalcVariability(CacheLookupHttpConfig * http_config_params,
       // is 1. Actually the 'proxy.config.cache.vary_on_user_agent' is useless in such case
//
       ///////////////////////////////////////////////////////////////////////////////////////
       if (http_config_params->cache_global_user_agent_header &&
-          !ink_string_fast_strcasecmp((char *) field->str, "User-Agent"))
+          !strcasecmp((char *) field->str, "User-Agent"))
         continue;
 
       // Disable Vary mismatch checking for Accept-Encoding.  This is only safe to
       // set if you are promising to fix any Accept-Encoding/Content-Encoding mismatches.
       if (http_config_params->ignore_accept_encoding_mismatch && 
-          !ink_string_fast_strcasecmp((char *) field->str, "Accept-Encoding"))
+          !strcasecmp((char *) field->str, "Accept-Encoding"))
         continue;
 
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9533a4d3/proxy/http/remap/UrlRewrite.cc
----------------------------------------------------------------------
diff --git a/proxy/http/remap/UrlRewrite.cc b/proxy/http/remap/UrlRewrite.cc
index dd0a262..9bbf466 100644
--- a/proxy/http/remap/UrlRewrite.cc
+++ b/proxy/http/remap/UrlRewrite.cc
@@ -46,47 +46,47 @@ check_remap_option(char *argv[], int argc, unsigned long findmode = 0,
int *_ret
     *argptr = NULL;
   if (argv && argc > 0) {
     for (int i = 0; i < argc; i++) {
-      if (!ink_string_fast_strcasecmp(argv[i], "map_with_referer")) {
+      if (!strcasecmp(argv[i], "map_with_referer")) {
         if ((findmode & REMAP_OPTFLG_MAP_WITH_REFERER) != 0)
           idx = i;
         ret_flags |= REMAP_OPTFLG_MAP_WITH_REFERER;
-      } else if (!ink_string_fast_strncasecmp(argv[i], "plugin=", 7)) {
+      } else if (!strncasecmp(argv[i], "plugin=", 7)) {
         if ((findmode & REMAP_OPTFLG_PLUGIN) != 0)
           idx = i;
         if (argptr)
           *argptr = &argv[i][7];
         ret_flags |= REMAP_OPTFLG_PLUGIN;
-      } else if (!ink_string_fast_strncasecmp(argv[i], "pparam=", 7)) {
+      } else if (!strncasecmp(argv[i], "pparam=", 7)) {
         if ((findmode & REMAP_OPTFLG_PPARAM) != 0)
           idx = i;
         if (argptr)
           *argptr = &argv[i][7];
         ret_flags |= REMAP_OPTFLG_PPARAM;
-      } else if (!ink_string_fast_strncasecmp(argv[i], "method=", 7)) {
+      } else if (!strncasecmp(argv[i], "method=", 7)) {
         if ((findmode & REMAP_OPTFLG_METHOD) != 0)
           idx = i;
         if (argptr)
           *argptr = &argv[i][7];
         ret_flags |= REMAP_OPTFLG_METHOD;
-      } else if (!ink_string_fast_strncasecmp(argv[i], "src_ip=~", 8)) {
+      } else if (!strncasecmp(argv[i], "src_ip=~", 8)) {
         if ((findmode & REMAP_OPTFLG_SRC_IP) != 0)
           idx = i;
         if (argptr)
           *argptr = &argv[i][8];
         ret_flags |= (REMAP_OPTFLG_SRC_IP | REMAP_OPTFLG_INVERT);
-      } else if (!ink_string_fast_strncasecmp(argv[i], "src_ip=", 7)) {
+      } else if (!strncasecmp(argv[i], "src_ip=", 7)) {
         if ((findmode & REMAP_OPTFLG_SRC_IP) != 0)
           idx = i;
         if (argptr)
           *argptr = &argv[i][7];
         ret_flags |= REMAP_OPTFLG_SRC_IP;
-      } else if (!ink_string_fast_strncasecmp(argv[i], "action=", 7)) {
+      } else if (!strncasecmp(argv[i], "action=", 7)) {
         if ((findmode & REMAP_OPTFLG_ACTION) != 0)
           idx = i;
         if (argptr)
           *argptr = &argv[i][7];
         ret_flags |= REMAP_OPTFLG_ACTION;
-      } else if (!ink_string_fast_strncasecmp(argv[i], "mapid=", 6)) {
+      } else if (!strncasecmp(argv[i], "mapid=", 6)) {
         if ((findmode & REMAP_OPTFLG_MAP_ID) != 0)
           idx = i;
         if (argptr)
@@ -239,27 +239,27 @@ validate_filter_args(acl_filter_rule ** rule_pp, char **argv, int argc,
char *er
       }
       // Please remember that the order of hash idx creation is very important and it is
defined
       // in HTTP.cc file
-      if (!ink_string_fast_strcasecmp(argptr, "CONNECT"))
+      if (!strcasecmp(argptr, "CONNECT"))
         m = HTTP_WKSIDX_CONNECT;
-      else if (!ink_string_fast_strcasecmp(argptr, "DELETE"))
+      else if (!strcasecmp(argptr, "DELETE"))
         m = HTTP_WKSIDX_DELETE;
-      else if (!ink_string_fast_strcasecmp(argptr, "GET"))
+      else if (!strcasecmp(argptr, "GET"))
         m = HTTP_WKSIDX_GET;
-      else if (!ink_string_fast_strcasecmp(argptr, "HEAD"))
+      else if (!strcasecmp(argptr, "HEAD"))
         m = HTTP_WKSIDX_HEAD;
-      else if (!ink_string_fast_strcasecmp(argptr, "ICP_QUERY"))
+      else if (!strcasecmp(argptr, "ICP_QUERY"))
         m = HTTP_WKSIDX_ICP_QUERY;
-      else if (!ink_string_fast_strcasecmp(argptr, "OPTIONS"))
+      else if (!strcasecmp(argptr, "OPTIONS"))
         m = HTTP_WKSIDX_OPTIONS;
-      else if (!ink_string_fast_strcasecmp(argptr, "POST"))
+      else if (!strcasecmp(argptr, "POST"))
         m = HTTP_WKSIDX_POST;
-      else if (!ink_string_fast_strcasecmp(argptr, "PURGE"))
+      else if (!strcasecmp(argptr, "PURGE"))
         m = HTTP_WKSIDX_PURGE;
-      else if (!ink_string_fast_strcasecmp(argptr, "PUT"))
+      else if (!strcasecmp(argptr, "PUT"))
         m = HTTP_WKSIDX_PUT;
-      else if (!ink_string_fast_strcasecmp(argptr, "TRACE"))
+      else if (!strcasecmp(argptr, "TRACE"))
         m = HTTP_WKSIDX_TRACE;
-      else if (!ink_string_fast_strcasecmp(argptr, "PUSH"))
+      else if (!strcasecmp(argptr, "PUSH"))
         m = HTTP_WKSIDX_PUSH;
       else {
         Debug("url_rewrite", "[validate_filter_args] Unknown method value %s", argptr);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9533a4d3/proxy/logging/LogFilter.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogFilter.cc b/proxy/logging/LogFilter.cc
index 74318a2..359ed0b 100644
--- a/proxy/logging/LogFilter.cc
+++ b/proxy/logging/LogFilter.cc
@@ -227,10 +227,10 @@ bool LogFilterString::toss_this_entry(LogAccess * lad)
     // actual length, so we just use the fact that a MATCH is not possible
     // when marsh_len <= (length of the filter string)
     //
-    cond_satisfied = _checkCondition(&ink_string_fast_strcmp, buf, marsh_len, m_value,
DATA_LENGTH_LARGER);
+    cond_satisfied = _checkCondition(&strcmp, buf, marsh_len, m_value, DATA_LENGTH_LARGER);
     break;
   case CASE_INSENSITIVE_MATCH:
-    cond_satisfied = _checkCondition(&ink_string_fast_strcasecmp, buf, marsh_len, m_value,
DATA_LENGTH_LARGER);
+    cond_satisfied = _checkCondition(&strcasecmp, buf, marsh_len, m_value, DATA_LENGTH_LARGER);
     break;
   case CONTAIN:
     cond_satisfied = _checkCondition(&_isSubstring, buf, marsh_len, m_value, DATA_LENGTH_LARGER);


Mime
View raw message