trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject svn commit: r1166456 [2/2] - in /trafficserver/traffic/trunk: cop/ iocore/cache/ iocore/cluster/ iocore/dns/ iocore/hostdb/ iocore/net/ iocore/utils/ lib/records/ lib/ts/ mgmt/ mgmt/api/ mgmt/api/remote/ mgmt/cli/ mgmt/cluster/ mgmt/stats/ mgmt/tools/ ...
Date Wed, 07 Sep 2011 22:47:12 GMT
Modified: trafficserver/traffic/trunk/mgmt/utils/WebMgmtUtils.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/mgmt/utils/WebMgmtUtils.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/mgmt/utils/WebMgmtUtils.cc (original)
+++ trafficserver/traffic/trunk/mgmt/utils/WebMgmtUtils.cc Wed Sep  7 22:47:10 2011
@@ -531,7 +531,7 @@ varStrFromName(const char *varNameConst,
   ///  b - bytes.  Ints and Counts only.  Amounts are
   //       transformed into one of GB, MB, KB, or B
   //
-  varName = xstrdup(varNameConst);
+  varName = ats_strdup(varNameConst);
   varNameLen = strlen(varName);
   if (varNameLen > 3 && varName[varNameLen - 2] == '\\') {
     formatOption = varName[varNameLen - 1];
@@ -769,7 +769,7 @@ processFormSubmission(char *submission)
     return NULL;
   }
 
-  submission_copy = xstrdup(submission);
+  submission_copy = ats_strdup(submission);
   numUpdates = updates.Initialize(submission_copy, SHARE_TOKS);
 
   for (int i = 0; i < numUpdates; i++) {
@@ -781,14 +781,14 @@ processFormSubmission(char *submission)
     //    a value.  If the submission is invalid, just forget
     //    about it.
     if (pairNum == 1 || pairNum == 2) {
-      name = xstrdup(pair[0]);
+      name = ats_strdup(pair[0]);
       substituteUnsafeChars(name);
 
       // If the value is blank, store it as a null
       if (pairNum == 1) {
         value = NULL;
       } else {
-        value = xstrdup(pair[1]);
+        value = ats_strdup(pair[1]);
         substituteUnsafeChars(value);
       }
 
@@ -828,7 +828,7 @@ processFormSubmission_noSubstitute(char 
     return NULL;
   }
 
-  submission_copy = xstrdup(submission);
+  submission_copy = ats_strdup(submission);
   numUpdates = updates.Initialize(submission_copy, SHARE_TOKS);
 
   for (int i = 0; i < numUpdates; i++) {
@@ -840,13 +840,13 @@ processFormSubmission_noSubstitute(char 
     //    a value.  If the submission is invalid, just forget
     //    about it.
     if (pairNum == 1 || pairNum == 2) {
-      name = xstrdup(pair[0]);
+      name = ats_strdup(pair[0]);
 
       // If the value is blank, store it as a null
       if (pairNum == 1) {
         value = NULL;
       } else {
-        value = xstrdup(pair[1]);
+        value = ats_strdup(pair[1]);
       }
 
       ink_hash_table_insert(nameVal, name, value);

Modified: trafficserver/traffic/trunk/mgmt/web2/WebHttpMessage.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/mgmt/web2/WebHttpMessage.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/mgmt/web2/WebHttpMessage.cc (original)
+++ trafficserver/traffic/trunk/mgmt/web2/WebHttpMessage.cc Wed Sep  7 22:47:10 2011
@@ -159,7 +159,7 @@ httpMessage::addRequestLine(char *reques
 
   // Make a copy of the string so that we
   //   log it later
-  client_request = xstrdup(request);
+  client_request = ats_strdup(request);
   requestLen = strlen(client_request);
   if (requestLen > 0 && client_request[requestLen - 1] == '\r') {
     client_request[requestLen - 1] = '\0';
@@ -491,7 +491,7 @@ httpResponse::writeHdr(SocketInfo socket
   hdr.copyFrom(dateStr, strlen(dateStr));
   hdr.copyFrom(buffer, strlen(buffer));
   hdr.copyFrom("\r\n", 2);
-  dateResponse = xstrdup(buffer);
+  dateResponse = ats_strdup(buffer);
 
   // Not cachable if marked not cachable, or has no L-M date
   if ((getCachable() == 0) || (lastMod == -1)) {
@@ -540,7 +540,7 @@ void
 httpResponse::setContentType(const char *str)
 {
   if (str != NULL) {
-    explicitConType = xstrdup(str);
+    explicitConType = ats_strdup(str);
   }
 }
 
@@ -548,7 +548,7 @@ void
 httpResponse::setRealm(const char *realm)
 {
   if (realm != NULL) {
-    authRealm = xstrdup(realm);
+    authRealm = ats_strdup(realm);
   }
 }
 
@@ -556,7 +556,7 @@ void
 httpResponse::setRefreshURL(const char *url)
 {
   if (url != NULL) {
-    refreshURL = xstrdup(url);
+    refreshURL = ats_strdup(url);
   }
 }
 
@@ -564,7 +564,7 @@ void
 httpResponse::setLocationURL(const char *url)
 {
   if (url != NULL) {
-    locationURL = xstrdup(url);
+    locationURL = ats_strdup(url);
   }
 }
 

Modified: trafficserver/traffic/trunk/mgmt/web2/WebIntrMain.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/mgmt/web2/WebIntrMain.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/mgmt/web2/WebIntrMain.cc (original)
+++ trafficserver/traffic/trunk/mgmt/web2/WebIntrMain.cc Wed Sep  7 22:47:10 2011
@@ -418,7 +418,7 @@ webIntr_main(void *x)
 
     if ((err = stat(autoconfContext.docRoot, &s)) < 0) {
       ats_free(autoconfContext.docRoot);
-      autoconfContext.docRoot = xstrdup(system_config_directory);
+      autoconfContext.docRoot = ats_strdup(system_config_directory);
       if ((err = stat(autoconfContext.docRoot, &s)) < 0) {
         mgmt_elog("[WebIntrMain] unable to stat() directory '%s': %d %d, %s\n",
                 autoconfContext.docRoot, err, errno, strerror(errno));

Modified: trafficserver/traffic/trunk/mgmt/web2/WebOverview.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/mgmt/web2/WebOverview.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/mgmt/web2/WebOverview.cc (original)
+++ trafficserver/traffic/trunk/mgmt/web2/WebOverview.cc Wed Sep  7 22:47:10 2011
@@ -87,7 +87,7 @@ overviewRecord::overviewRecord(unsigned 
     nameFailed.s_addr = inetAddr;
     mgmt_log("[overviewRecord::overviewRecord] Unable to find hostname for %s\n", inet_ntoa(nameFailed));
     ats_free(name_l);              // about to overwrite name_l, so we need to free it first
-    name_l = xstrdup(inet_ntoa(nameFailed));
+    name_l = ats_strdup(inet_ntoa(nameFailed));
   }
 
   const size_t hostNameLen = strlen(name_l) + 1;
@@ -359,7 +359,7 @@ overviewRecord::readString(const char *n
       order -= node_rec_first_ix; // Offset
       ink_release_assert(order < node_rec_data.num_recs);
       ink_debug_assert(order < node_rec_data.num_recs);
-      rec = xstrdup(node_rec_data.recs[order].data.rec_string);
+      rec = ats_strdup(node_rec_data.recs[order].data.rec_string);
     }
   } else {
     rec_status = RecGetRecordString_Xmalloc(name, &rec);
@@ -412,7 +412,7 @@ overviewRecord::varStrFromName(const cha
   ///  b - bytes.  Ints and Counts only.  Amounts are
   //       transformed into one of GB, MB, KB, or B
   //
-  varName = xstrdup(varNameConst);
+  varName = ats_strdup(varNameConst);
   varNameLen = strlen(varName);
   if (varNameLen > 3 && varName[varNameLen - 2] == '\\') {
     formatOption = varName[varNameLen - 1];
@@ -755,7 +755,7 @@ overviewPage::getClusterHosts(ExpandingA
 
   for (int i = 0; i < number; i++) {
     current = (overviewRecord *) sortRecords[i];
-    hosts->addEntry(xstrdup(current->hostname));
+    hosts->addEntry(ats_strdup(current->hostname));
   }
 
   ink_mutex_release(&accessLock);
@@ -1502,7 +1502,7 @@ overviewPage::resolvePeerHostname_ml(con
 
   if (ink_hash_table_lookup(nodeRecords, (InkHashTableKey) ipAddr, &lookup)) {
     peerRecord = (overviewRecord *) lookup;
-    returnName = xstrdup(peerRecord->hostname);
+    returnName = ats_strdup(peerRecord->hostname);
   }
 
   return returnName;

Modified: trafficserver/traffic/trunk/proxy/ControlBase.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/ControlBase.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/ControlBase.cc (original)
+++ trafficserver/traffic/trunk/proxy/ControlBase.cc Wed Sep  7 22:47:10 2011
@@ -377,7 +377,7 @@ bool MethodMod::check(HttpRequestData* r
 MethodMod*
 MethodMod::make(char * value, char const **) {
   MethodMod* mod = new MethodMod;
-  mod->text.set(xstrdup(value), strlen(value));
+  mod->text.set(ats_strdup(value), strlen(value));
   return mod;
 }
 
@@ -414,7 +414,7 @@ PrefixMod::make(char * value, char const
   // strip leading slashes because get_path which is used later
   // doesn't include them from the URL.
   while ('/' == *value) ++value;
-  mod->text.set(xstrdup(value), strlen(value));
+  mod->text.set(ats_strdup(value), strlen(value));
   return mod;
 }
 // ----------
@@ -439,7 +439,7 @@ bool SuffixMod::check(HttpRequestData* r
 SuffixMod*
 SuffixMod::make(char * value, char const ** error ) {
   SuffixMod* mod = new SuffixMod;
-  mod->text.set(xstrdup(value), strlen(value));
+  mod->text.set(ats_strdup(value), strlen(value));
   return mod;
 }
 
@@ -461,7 +461,7 @@ bool TagMod::check(HttpRequestData* req)
 TagMod*
 TagMod::make(char * value, char const ** error ) {
   TagMod* mod = new TagMod;
-  mod->text.set(xstrdup(value), strlen(value));
+  mod->text.set(ats_strdup(value), strlen(value));
   return mod;
 }
 // ----------

Modified: trafficserver/traffic/trunk/proxy/ControlMatcher.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/ControlMatcher.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/ControlMatcher.cc (original)
+++ trafficserver/traffic/trunk/proxy/ControlMatcher.cc Wed Sep  7 22:47:10 2011
@@ -316,7 +316,7 @@ template<class Data, class Result> char 
     re_array[num_el] = NULL;
     return errBuf;
   }
-  re_str[num_el] = xstrdup(pattern);
+  re_str[num_el] = ats_strdup(pattern);
 
   // Remove our consumed label from the parsed line
   line_info->line[0][line_info->dest_entry] = 0;
@@ -361,7 +361,7 @@ template<class Data, class Result> void 
   // Can't do a regex match with a NULL string so
   //  use an empty one instead
   if (url_str == NULL) {
-    url_str = xstrdup("");
+    url_str = ats_strdup("");
   }
   // INKqa12980
   // The function unescapifyStr() is already called in
@@ -565,7 +565,7 @@ template<class Data, class Result>
   ink_assert(config_tags != NULL);
 
   matcher_name = name;
-  config_file_var = xstrdup(file_var);
+  config_file_var = ats_strdup(file_var);
   config_file_path[0] = '\0';
 
   REC_ReadConfigStringAlloc(config_file, config_file_var);

Modified: trafficserver/traffic/trunk/proxy/CoreUtils.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/CoreUtils.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/CoreUtils.cc (original)
+++ trafficserver/traffic/trunk/proxy/CoreUtils.cc Wed Sep  7 22:47:10 2011
@@ -926,7 +926,7 @@ CoreUtils::dump_history(HttpSM * hsm)
     int e = (int) hsm->history[i].event;
     char *fileline = load_string(hsm->history[i].fileline);
 
-    fileline = (fileline != NULL) ? fileline : xstrdup("UNKNOWN");
+    fileline = (fileline != NULL) ? fileline : ats_strdup("UNKNOWN");
 
 #if defined(_WIN32)
     // Visual C++ preprocessor is unable to stringify __LINE__
@@ -1031,7 +1031,7 @@ CoreUtils::load_string(const char *addr)
   int index = 0;
 
   if (addr == NULL) {
-    return xstrdup("NONE");
+    return ats_strdup("NONE");
   }
 
   while (index < 2048) {
@@ -1040,7 +1040,7 @@ CoreUtils::load_string(const char *addr)
     }
 
     if (buf[index] == '\0') {
-      return xstrdup(buf);
+      return ats_strdup(buf);
     }
     index++;
   }

Modified: trafficserver/traffic/trunk/proxy/IPAllow.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/IPAllow.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/IPAllow.cc (original)
+++ trafficserver/traffic/trunk/proxy/IPAllow.cc Wed Sep  7 22:47:10 2011
@@ -150,7 +150,7 @@ IpAllow::IpAllow(
 
   char *config_file;
 
-  config_file_var = xstrdup(config_var);
+  config_file_var = ats_strdup(config_var);
   config_file_path[0] = '\0';
 
   IPAllowReadConfigStringAlloc(config_file, (char *) config_file_var);

Modified: trafficserver/traffic/trunk/proxy/InkAPI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkAPI.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkAPI.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkAPI.cc Wed Sep  7 22:47:10 2011
@@ -1763,15 +1763,15 @@ TSPluginRegister(TSSDKVersion sdk_versio
   }
 
   if (plugin_info->plugin_name) {
-    plugin_reg_current->plugin_name = xstrdup(plugin_info->plugin_name);
+    plugin_reg_current->plugin_name = ats_strdup(plugin_info->plugin_name);
   }
 
   if (plugin_info->vendor_name) {
-    plugin_reg_current->vendor_name = xstrdup(plugin_info->vendor_name);
+    plugin_reg_current->vendor_name = ats_strdup(plugin_info->vendor_name);
   }
 
   if (plugin_info->support_email) {
-    plugin_reg_current->support_email = xstrdup(plugin_info->support_email);
+    plugin_reg_current->support_email = ats_strdup(plugin_info->support_email);
   }
 
   return TS_SUCCESS;
@@ -5386,10 +5386,10 @@ TSHttpArgIndexReserve(const char* name, 
   int volatile ix = ink_atomic_increment(&next_argv_index, 1);
 
   if (ix < HTTP_SSN_TXN_MAX_USER_ARG) {
-    state_arg_table[ix].name = xstrdup(name);
+    state_arg_table[ix].name = ats_strdup(name);
     state_arg_table[ix].name_len = strlen(state_arg_table[ix].name);
     if (description)
-      state_arg_table[ix].description = xstrdup(description);
+      state_arg_table[ix].description = ats_strdup(description);
     *arg_idx = ix;
 
     return TS_SUCCESS;

Modified: trafficserver/traffic/trunk/proxy/InkAPITestTool.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkAPITestTool.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkAPITestTool.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkAPITestTool.cc Wed Sep  7 22:47:10 2011
@@ -496,7 +496,7 @@ synclient_txn_send_request(ClientTxn * t
   sockaddr_in addr;
 
   TSAssert(txn->magic == MAGIC_ALIVE);
-  txn->request = xstrdup(request);
+  txn->request = ats_strdup(request);
   SET_TEST_HANDLER(txn->current_handler, synclient_txn_connect_handler);
 
   cont = TSContCreate(synclient_txn_main_handler, TSMutexCreate());
@@ -513,7 +513,7 @@ synclient_txn_send_request_to_vc(ClientT
 {
   TSCont cont;
   TSAssert(txn->magic == MAGIC_ALIVE);
-  txn->request = xstrdup(request);
+  txn->request = ats_strdup(request);
   SET_TEST_HANDLER(txn->current_handler, synclient_txn_connect_handler);
 
   cont = TSContCreate(synclient_txn_main_handler, TSMutexCreate());

Modified: trafficserver/traffic/trunk/proxy/InkXml.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkXml.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkXml.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkXml.cc Wed Sep  7 22:47:10 2011
@@ -36,8 +36,8 @@
 
 InkXmlAttr::InkXmlAttr(char *tag, char *value)
 {
-  m_tag = xstrdup(tag);
-  m_value = xstrdup(value);
+  m_tag = ats_strdup(tag);
+  m_value = ats_strdup(value);
 }
 
 InkXmlAttr::~InkXmlAttr()
@@ -58,7 +58,7 @@ InkXmlAttr::display(FILE * fd)
 
 InkXmlObject::InkXmlObject(char *object_name, bool dup_attrs_allowed)
 {
-  m_object_name = xstrdup(object_name);
+  m_object_name = ats_strdup(object_name);
   m_dup_attrs_allowed = dup_attrs_allowed;
 }
 
@@ -134,7 +134,7 @@ InkXmlConfigFile::InkXmlConfigFile(char 
 m_line(0),
 m_col(0)
 {
-  m_config_file = xstrdup(config_file);
+  m_config_file = ats_strdup(config_file);
 }
 
 InkXmlConfigFile::~InkXmlConfigFile()

Modified: trafficserver/traffic/trunk/proxy/Plugin.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Plugin.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Plugin.cc (original)
+++ trafficserver/traffic/trunk/proxy/Plugin.cc Wed Sep  7 22:47:10 2011
@@ -155,7 +155,7 @@ plugin_load(int argc, char *argv[], bool
   //    plugin we're starting up
   ink_assert(plugin_reg_current == NULL);
   plugin_reg_current = new PluginRegInfo;
-  plugin_reg_current->plugin_path = xstrdup(path);
+  plugin_reg_current->plugin_path = ats_strdup(path);
 
   init_func_w_handle_t inith = (init_func_w_handle_t) dll_findsym(handle, "TSPluginInitwDLLHandle");
   if (inith) {

Modified: trafficserver/traffic/trunk/proxy/Prefetch.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Prefetch.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Prefetch.cc (original)
+++ trafficserver/traffic/trunk/proxy/Prefetch.cc Wed Sep  7 22:47:10 2011
@@ -576,7 +576,7 @@ PrefetchTransform::hash_add(char *s)
       return NULL;
 
   *e = prefetchUrlEntryAllocator.alloc();
-  (*e)->init(xstrdup(s), md5);
+  (*e)->init(ats_strdup(s), md5);
 
   return *e;
 }
@@ -1921,13 +1921,13 @@ PrefetchConfiguration::readHtmlTags(int 
     // coverity[secure_coding]
     if ((num = sscanf(buf, " html_tag %63s %63s %63s %63s", tag, attr, attr_tag, attr_attr)) >= 2) {
       Debug("Prefetch", "Read html_tag: %s %s\n", tag, attr);
-      tags[ntags].tag = xstrdup(tag);
-      tags[ntags].attr = xstrdup(attr);
+      tags[ntags].tag = ats_strdup(tag);
+      tags[ntags].attr = ats_strdup(attr);
       if (num >= 4) {
         if (!attrs_exist)
           attrs_exist = true;
-        attrs[ntags].tag = xstrdup(attr_tag);
-        attrs[ntags].tag = xstrdup(attr_attr);
+        attrs[ntags].tag = ats_strdup(attr_tag);
+        attrs[ntags].tag = ats_strdup(attr_attr);
       }
       ntags++;
     }

Modified: trafficserver/traffic/trunk/proxy/Update.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Update.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Update.cc (original)
+++ trafficserver/traffic/trunk/proxy/Update.cc Wed Sep  7 22:47:10 2011
@@ -281,7 +281,7 @@ UpdateEntry::ValidURL(char *s, char *e)
   _URLhandle.create(NULL);
   err = _URLhandle.parse(&url_start, url_end);
   if (err >= 0) {
-    _url = xstrdup(s);
+    _url = ats_strdup(s);
     return 0;                   // Valid URL
   } else {
     _URLhandle.destroy();
@@ -383,7 +383,7 @@ UpdateEntry::ValidHeaders(char *s, char 
 
   // At least 1 valid header exists
 
-  _request_headers = xstrdup(s);
+  _request_headers = ats_strdup(s);
   return 0;                     // OK; > 1 valid headers
 }
 
@@ -1674,7 +1674,7 @@ RecursiveHttpGet::RecursiveHttpGetEvent(
         } else {
           // Complete remaining UpdateEntry initializations
 
-          ue->_request_headers = xstrdup(_request_headers);
+          ue->_request_headers = ats_strdup(_request_headers);
           ue->BuildHttpRequest();
           ue->Init(1);          // Derived URL
 

Modified: trafficserver/traffic/trunk/proxy/congest/Congestion.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/congest/Congestion.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/congest/Congestion.cc (original)
+++ trafficserver/traffic/trunk/proxy/congest/Congestion.cc Wed Sep  7 22:47:10 2011
@@ -79,11 +79,11 @@ int congestionControlLocalTime = 0;
 
 CongestionControlRecord::CongestionControlRecord(const CongestionControlRecord & rec)
 {
-  prefix = xstrdup(rec.prefix);
+  prefix = ats_strdup(rec.prefix);
   prefix_len = rec.prefix_len;
   port = rec.port;
   congestion_scheme = rec.congestion_scheme;
-  error_page = xstrdup(rec.error_page);
+  error_page = ats_strdup(rec.error_page);
   max_connection_failures = rec.max_connection_failures;
   fail_window = rec.fail_window;
   proxy_retry_interval = rec.proxy_retry_interval;
@@ -136,7 +136,7 @@ CongestionControlRecord::validate()
   }
 
   if (error_page == NULL)
-    error_page = xstrdup(DEFAULT_error_page);
+    error_page = ats_strdup(DEFAULT_error_page);
   if (max_connection_failures >= CONG_RULE_MAX_max_connection_failures ||
       (max_connection_failures <= 0 && max_connection_failures != CONG_RULE_ULIMITED_max_connection_failures)
     ) {
@@ -212,9 +212,9 @@ CongestionControlRecord::Init(matcher_li
         congestion_scheme = PER_IP;
       }
     } else if (strcasecmp(label, "error_page") == 0) {
-      error_page = xstrdup(val);
+      error_page = ats_strdup(val);
     } else if (strcasecmp(label, "prefix") == 0) {
-      prefix = xstrdup(val);
+      prefix = ats_strdup(val);
       prefix_len = strlen(prefix);
       rank += 1;
       // prefix will be used in the ControlBase
@@ -616,7 +616,7 @@ m_congested(0),
 m_stat_congested_conn_failures(0),
 m_M_congested(0), m_last_M_congested(0), m_num_connections(0), m_stat_congested_max_conn(0), m_ref_count(1)
 {
-  m_hostname = xstrdup(hostname);
+  m_hostname = ats_strdup(hostname);
   rule->get();
   pRecord = rule;
   clearFailHistory();

Modified: trafficserver/traffic/trunk/proxy/hdrs/load_http_hdr.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/hdrs/load_http_hdr.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/hdrs/load_http_hdr.cc (original)
+++ trafficserver/traffic/trunk/proxy/hdrs/load_http_hdr.cc Wed Sep  7 22:47:10 2011
@@ -127,7 +127,7 @@ process_mime_block_impl(MIMEFieldBlockIm
   for (unsigned int i = 0; i < freetop; i++) {
     MIMEField *f = &mblock->m_field_slots[i];
     if (hdrtoken_is_valid_wks_idx(f->m_wks_idx)) {
-      n = xstrdup(hdrtoken_index_to_wks(f->m_wks_idx));
+      n = ats_strdup(hdrtoken_index_to_wks(f->m_wks_idx));
     } else {
       n = load_string(f->m_ptr_name, f->m_len_name, offset);
     }

Modified: trafficserver/traffic/trunk/proxy/http/HttpBodyFactory.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http/HttpBodyFactory.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http/HttpBodyFactory.cc (original)
+++ trafficserver/traffic/trunk/proxy/http/HttpBodyFactory.cc Wed Sep  7 22:47:10 2011
@@ -319,7 +319,7 @@ HttpBodyFactory::reconfigure()
         Warning(" Please set 'proxy.config.body_factory.template_sets_dir' ");
       } else {
         ats_free(directory_of_template_sets);
-        directory_of_template_sets = xstrdup(system_config_directory);
+        directory_of_template_sets = ats_strdup(system_config_directory);
       }
     }
   }
@@ -788,7 +788,7 @@ HttpBodySet::init(char *set, char *dir)
   if (fd < 0)
     return (-1);
 
-  this->set_name = xstrdup(set);
+  this->set_name = ats_strdup(set);
 
   if (this->table_of_pages)
     delete(this->table_of_pages);
@@ -861,10 +861,10 @@ HttpBodySet::init(char *set, char *dir)
 
     if (strcasecmp(name, "Content-Language") == 0) {
       ats_free(this->content_language);
-      this->content_language = xstrdup(value);
+      this->content_language = ats_strdup(value);
     } else if (strcasecmp(name, "Content-Charset") == 0) {
       ats_free(this->content_charset);
-      this->content_charset = xstrdup(value);
+      this->content_charset = ats_strdup(value);
     }
   }
 
@@ -874,12 +874,12 @@ HttpBodySet::init(char *set, char *dir)
 
   if (!this->content_language) {
     if (strcmp(set, "default") == 0)
-      this->content_language = xstrdup("en");
+      this->content_language = ats_strdup("en");
     else
-      this->content_language = xstrdup(set);
+      this->content_language = ats_strdup(set);
   }
   if (!this->content_charset)
-    this->content_charset = xstrdup("iso-8859-1");
+    this->content_charset = ats_strdup("iso-8859-1");
 
   close(fd);
   return (lines_added);

Modified: trafficserver/traffic/trunk/proxy/http/HttpConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http/HttpConfig.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http/HttpConfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/http/HttpConfig.cc Wed Sep  7 22:47:10 2011
@@ -1416,7 +1416,7 @@ HttpConfig::reconfigure()
 
   params->incoming_ip_to_bind_saddr = m_master.incoming_ip_to_bind_saddr;
   params->oride.outgoing_ip_to_bind_saddr = m_master.oride.outgoing_ip_to_bind_saddr;
-  params->proxy_hostname = xstrdup(m_master.proxy_hostname);
+  params->proxy_hostname = ats_strdup(m_master.proxy_hostname);
   params->proxy_hostname_len = (params->proxy_hostname) ? strlen(params->proxy_hostname) : 0;
   params->no_dns_forward_to_parent = INT_TO_BOOL(m_master.no_dns_forward_to_parent);
   params->uncacheable_requests_bypass_parent = INT_TO_BOOL(m_master.uncacheable_requests_bypass_parent);
@@ -1443,19 +1443,19 @@ HttpConfig::reconfigure()
   params->oride.insert_request_via_string = INT_TO_BOOL(m_master.oride.insert_request_via_string);
   params->oride.insert_response_via_string = INT_TO_BOOL(m_master.oride.insert_response_via_string);
   params->verbose_via_string = INT_TO_BYTE(m_master.verbose_via_string);
-  params->proxy_request_via_string = xstrdup(m_master.proxy_request_via_string);
+  params->proxy_request_via_string = ats_strdup(m_master.proxy_request_via_string);
   params->proxy_request_via_string_len = (params->proxy_request_via_string) ? strlen(params->proxy_request_via_string) : 0;
-  params->proxy_response_via_string = xstrdup(m_master.proxy_response_via_string);
+  params->proxy_response_via_string = ats_strdup(m_master.proxy_response_via_string);
   params->proxy_response_via_string_len = (params->proxy_response_via_string) ? strlen(params->proxy_response_via_string) : 0;
 
   params->wuts_enabled = INT_TO_BOOL(m_master.wuts_enabled);
   params->log_spider_codes = INT_TO_BOOL(m_master.log_spider_codes);
 
-  params->url_expansions_string = xstrdup(m_master.url_expansions_string);
+  params->url_expansions_string = ats_strdup(m_master.url_expansions_string);
   params->url_expansions = parse_url_expansions(params->url_expansions_string, &params->num_url_expansions);
 
   params->proxy_server_port = m_master.proxy_server_port;
-  params->proxy_server_other_ports = xstrdup(m_master.proxy_server_other_ports);
+  params->proxy_server_other_ports = ats_strdup(m_master.proxy_server_other_ports);
   params->oride.keep_alive_enabled_in = INT_TO_BOOL(m_master.oride.keep_alive_enabled_in);
   params->oride.keep_alive_enabled_out = INT_TO_BOOL(m_master.oride.keep_alive_enabled_out);
   params->oride.chunking_enabled = INT_TO_BOOL(m_master.oride.chunking_enabled);
@@ -1497,13 +1497,13 @@ HttpConfig::reconfigure()
   params->oride.anonymize_remove_client_ip = INT_TO_BOOL(m_master.oride.anonymize_remove_client_ip);
   params->oride.anonymize_insert_client_ip = INT_TO_BOOL(m_master.oride.anonymize_insert_client_ip);
   params->oride.append_xforwards_header = INT_TO_BOOL(m_master.oride.append_xforwards_header);
-  params->anonymize_other_header_list = xstrdup(m_master.anonymize_other_header_list);
+  params->anonymize_other_header_list = ats_strdup(m_master.anonymize_other_header_list);
 
-  params->global_user_agent_header = xstrdup(m_master.global_user_agent_header);
+  params->global_user_agent_header = ats_strdup(m_master.global_user_agent_header);
   params->global_user_agent_header_size = params->global_user_agent_header ?
     strlen(params->global_user_agent_header) : 0;
 
-  params->oride.proxy_response_server_string = xstrdup(m_master.oride.proxy_response_server_string);
+  params->oride.proxy_response_server_string = ats_strdup(m_master.oride.proxy_response_server_string);
   params->oride.proxy_response_server_string_len = params->oride.proxy_response_server_string ?
     strlen(params->oride.proxy_response_server_string) : 0;
   params->oride.proxy_response_server_enabled = m_master.oride.proxy_response_server_enabled;
@@ -1529,9 +1529,9 @@ HttpConfig::reconfigure()
   params->oride.freshness_fuzz_min_time = m_master.oride.freshness_fuzz_min_time;
   params->oride.freshness_fuzz_prob = m_master.oride.freshness_fuzz_prob;
 
-  params->cache_vary_default_text = xstrdup(m_master.cache_vary_default_text);
-  params->cache_vary_default_images = xstrdup(m_master.cache_vary_default_images);
-  params->cache_vary_default_other = xstrdup(m_master.cache_vary_default_other);
+  params->cache_vary_default_text = ats_strdup(m_master.cache_vary_default_text);
+  params->cache_vary_default_images = ats_strdup(m_master.cache_vary_default_images);
+  params->cache_vary_default_other = ats_strdup(m_master.cache_vary_default_other);
 
   // open read failure retries
   params->oride.max_cache_open_read_retries = m_master.oride.max_cache_open_read_retries;
@@ -1561,7 +1561,7 @@ HttpConfig::reconfigure()
   params->oride.cache_required_headers = INT_TO_BYTE(m_master.oride.cache_required_headers);
   params->cache_range_lookup = INT_TO_BOOL(m_master.cache_range_lookup);
 
-  params->connect_ports_string = xstrdup(m_master.connect_ports_string);
+  params->connect_ports_string = ats_strdup(m_master.connect_ports_string);
   params->connect_ports = parse_ports_list(params->connect_ports_string);
 
   params->request_hdr_max_size = m_master.request_hdr_max_size;
@@ -1579,7 +1579,7 @@ HttpConfig::reconfigure()
   params->default_buffer_size_index = m_master.default_buffer_size_index;
   params->default_buffer_water_mark = m_master.default_buffer_water_mark;
   params->enable_http_info = INT_TO_BOOL(m_master.enable_http_info);
-  params->reverse_proxy_no_host_redirect = xstrdup(m_master.reverse_proxy_no_host_redirect);
+  params->reverse_proxy_no_host_redirect = ats_strdup(m_master.reverse_proxy_no_host_redirect);
   params->reverse_proxy_no_host_redirect_len =
     params->reverse_proxy_no_host_redirect ? strlen(params->reverse_proxy_no_host_redirect) : 0;
 
@@ -1846,24 +1846,22 @@ HttpUserAgent_RegxEntry::create(char *_r
     } else
       return store_error_message(errmsgbuf, errmsgbuf_size, "Incorrect string type - must start with '.'");
 
-    if ((user_agent_str = xstrdup(refexp_str)) != NULL) {
-      retcode = true;
-      if (stype == STRTYPE_REGEXP) {
-        const char* error;
-        int erroffset;
-
-        regx = pcre_compile((const char *) user_agent_str, PCRE_CASELESS, &error, &erroffset, NULL);
-        if (regx == NULL) {
-          if (errmsgbuf && (errmsgbuf_size - 1) > 0)
-            ink_strncpy(errmsgbuf, error, errmsgbuf_size - 1);
-          user_agent_str = (char *)ats_free_null(user_agent_str);
-          retcode = false;
-        } else
-          regx_valid = true;
-      }
-      user_agent_str_size = user_agent_str ? strlen(user_agent_str) : 0;
-    } else
-      return store_error_message(errmsgbuf, errmsgbuf_size, "Memory allocation error (xstrdup)");
+    user_agent_str = ats_strdup(refexp_str);
+    retcode = true;
+    if (stype == STRTYPE_REGEXP) {
+      const char* error;
+      int erroffset;
+
+      regx = pcre_compile((const char *) user_agent_str, PCRE_CASELESS, &error, &erroffset, NULL);
+      if (regx == NULL) {
+        if (errmsgbuf && (errmsgbuf_size - 1) > 0)
+          ink_strncpy(errmsgbuf, error, errmsgbuf_size - 1);
+        user_agent_str = (char *)ats_free_null(user_agent_str);
+        retcode = false;
+      } else
+        regx_valid = true;
+    }
+    user_agent_str_size = user_agent_str ? strlen(user_agent_str) : 0;
   }
   return retcode;
 }

Modified: trafficserver/traffic/trunk/proxy/http/remap/AclFiltering.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http/remap/AclFiltering.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http/remap/AclFiltering.cc (original)
+++ trafficserver/traffic/trunk/proxy/http/remap/AclFiltering.cc Wed Sep  7 22:47:10 2011
@@ -66,7 +66,7 @@ acl_filter_rule::add_argv(int _argc, cha
   int real_cnt = 0;
   if (likely(_argv)) {
     for (int i = 0; i < _argc && argc < ACL_FILTER_MAX_ARGV; i++) {
-      if (likely(_argv[i] && (argv[argc] = xstrdup(_argv[i])) != NULL)) {
+      if (likely(_argv[i] && (argv[argc] = ats_strdup(_argv[i])) != NULL)) {
         real_cnt++;
         argc++;
       }
@@ -80,7 +80,7 @@ acl_filter_rule::name(const char *_name)
 {
   filter_name_size = 0;
   filter_name = (char *)ats_free_null(filter_name);
-  if (_name && _name[0] && (filter_name = xstrdup(_name)) != NULL) {
+  if (_name && _name[0] && (filter_name = ats_strdup(_name)) != NULL) {
     filter_name_size = strlen(filter_name);
   }
   return filter_name_size;

Modified: trafficserver/traffic/trunk/proxy/http/remap/RemapPluginInfo.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http/remap/RemapPluginInfo.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http/remap/RemapPluginInfo.cc (original)
+++ trafficserver/traffic/trunk/proxy/http/remap/RemapPluginInfo.cc Wed Sep  7 22:47:10 2011
@@ -29,7 +29,7 @@ remap_plugin_info::remap_plugin_info(cha
 {
   // coverity did not see ats_free
   // coverity[ctor_dtor_leak]
-  if (_path && likely((path = xstrdup(_path)) > 0))
+  if (_path && likely((path = ats_strdup(_path)) > 0))
     path_size = strlen(path);
 }
 

Modified: trafficserver/traffic/trunk/proxy/http/remap/RemapProcessor.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http/remap/RemapProcessor.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http/remap/RemapProcessor.cc (original)
+++ trafficserver/traffic/trunk/proxy/http/remap/RemapProcessor.cc Wed Sep  7 22:47:10 2011
@@ -228,15 +228,15 @@ RemapProcessor::finish_remap(HttpTransac
             }
           }
           tmp_redirect_buf[sizeof(tmp_redirect_buf) - 1] = 0;
-          *redirect_url = xstrdup(tmp_redirect_buf);
+          *redirect_url = ats_strdup(tmp_redirect_buf);
         }
       } else {
-        *redirect_url = xstrdup(rewrite_table->http_default_redirect_url);
+        *redirect_url = ats_strdup(rewrite_table->http_default_redirect_url);
       }
 
       if (*redirect_url == NULL) {
         *redirect_url =
-          xstrdup(map->filter_redirect_url ? map->filter_redirect_url : rewrite_table->http_default_redirect_url);
+          ats_strdup(map->filter_redirect_url ? map->filter_redirect_url : rewrite_table->http_default_redirect_url);
       }
 
       return false;
@@ -263,7 +263,7 @@ RemapProcessor::finish_remap(HttpTransac
                                                               MIME_LEN_HOST,
                                                               &old_host_hdr_len);
       if (old_host_hdr) {
-        old_host_hdr = xstrndup(old_host_hdr, old_host_hdr_len);
+        old_host_hdr = ats_strndup(old_host_hdr, old_host_hdr_len);
         Debug("url_rewrite", "Host: Header before rewrite %.*s", old_host_hdr_len, old_host_hdr);
         ats_free(old_host_hdr);
       }

Modified: trafficserver/traffic/trunk/proxy/http/remap/UrlMapping.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http/remap/UrlMapping.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http/remap/UrlMapping.cc (original)
+++ trafficserver/traffic/trunk/proxy/http/remap/UrlMapping.cc Wed Sep  7 22:47:10 2011
@@ -159,7 +159,7 @@ redirect_tag_str::parse_format_redirect_
         if ((r->type = type) == 's') {
           char svd = *c;
           *c = 0;
-          r->chunk_str = xstrdup(url);
+          r->chunk_str = ats_strdup(url);
           *c = svd;
           url = c;
         } else
@@ -193,7 +193,7 @@ regx_valid(false)
       negative = true;
       _ref++;
     }
-    if ((referer = xstrdup(_ref)) != 0) {
+    if ((referer = ats_strdup(_ref)) != 0) {
       referer_size = strlen(referer);
       if (!strcmp(referer, "*"))
         any = true;

Modified: trafficserver/traffic/trunk/proxy/http/remap/UrlRewrite.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http/remap/UrlRewrite.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http/remap/UrlRewrite.cc (original)
+++ trafficserver/traffic/trunk/proxy/http/remap/UrlRewrite.cc Wed Sep  7 22:47:10 2011
@@ -486,7 +486,7 @@ UrlRewrite::UrlRewrite(const char *file_
   char *config_file = NULL;
 
   ink_assert(file_var_in != NULL);
-  this->file_var = xstrdup(file_var_in);
+  this->file_var = ats_strdup(file_var_in);
   config_file_path[0] = '\0';
 
   REVERSE_ReadConfigStringAlloc(config_file, file_var_in);
@@ -502,7 +502,7 @@ UrlRewrite::UrlRewrite(const char *file_
   if (this->ts_name == NULL) {
     pmgmt->signalManager(MGMT_SIGNAL_CONFIG_ERROR, "Unable to read proxy.config.proxy_name");
     Warning("%s Unable to determine proxy name.  Incorrect redirects could be generated", modulePrefix);
-    this->ts_name = xstrdup("");
+    this->ts_name = ats_strdup("");
   }
 
   this->http_default_redirect_url = NULL;
@@ -510,7 +510,7 @@ UrlRewrite::UrlRewrite(const char *file_
   if (this->http_default_redirect_url == NULL) {
     pmgmt->signalManager(MGMT_SIGNAL_CONFIG_ERROR, "Unable to read proxy.config.http.referer_default_redirect");
     Warning("%s Unable to determine default redirect url for \"referer\" filter.", modulePrefix);
-    this->http_default_redirect_url = xstrdup("http://www.apache.org");
+    this->http_default_redirect_url = ats_strdup("http://www.apache.org");
   }
 
   REVERSE_ReadConfigInteger(reverse_proxy, "proxy.config.reverse_proxy.enabled");
@@ -1137,9 +1137,9 @@ UrlRewrite::BuildTable()
     for (int j = 0; j < tok_count; j++) {
       if (((char *) whiteTok[j])[0] == '@') {
         if (((char *) whiteTok[j])[1])
-          bti.argv[bti.argc++] = xstrdup(&(((char *) whiteTok[j])[1]));
+          bti.argv[bti.argc++] = ats_strdup(&(((char *) whiteTok[j])[1]));
       } else {
-        bti.paramv[bti.paramc++] = xstrdup((char *) whiteTok[j]);
+        bti.paramv[bti.paramc++] = ats_strdup((char *) whiteTok[j]);
       }
     }
 
@@ -1272,7 +1272,7 @@ UrlRewrite::BuildTable()
     // Check if a tag is specified.
     if (bti.paramv[3] != NULL) {
       if (maptype == FORWARD_MAP_REFERER) {
-        new_mapping->filter_redirect_url = xstrdup(bti.paramv[3]);
+        new_mapping->filter_redirect_url = ats_strdup(bti.paramv[3]);
         if (!strcasecmp(bti.paramv[3], "<default>") || !strcasecmp(bti.paramv[3], "default") ||
             !strcasecmp(bti.paramv[3], "<default_redirect_url>") || !strcasecmp(bti.paramv[3], "default_redirect_url"))
           new_mapping->default_redirect_url = true;
@@ -1308,7 +1308,7 @@ UrlRewrite::BuildTable()
           }
         }
       } else {
-        new_mapping->tag = xstrdup(&(bti.paramv[3][0]));
+        new_mapping->tag = ats_strdup(&(bti.paramv[3][0]));
       }
     }
     // Check to see the fromHost remapping is a relative one
@@ -1398,7 +1398,7 @@ UrlRewrite::BuildTable()
             u_mapping->toUrl.create(NULL);
             u_mapping->toUrl.copy(&new_mapping->toUrl);
             if (bti.paramv[3] != NULL)
-              u_mapping->tag = xstrdup(&(bti.paramv[3][0]));
+              u_mapping->tag = ats_strdup(&(bti.paramv[3][0]));
             bool insert_result = (maptype != FORWARD_MAP_WITH_RECV_PORT) ? 
               TableInsert(forward_mappings.hash_lookup, u_mapping, ipv4_name) :
               TableInsert(forward_mappings_with_recv_port.hash_lookup, u_mapping, ipv4_name);
@@ -1708,14 +1708,14 @@ UrlRewrite::load_remap_plugin(char *argv
     snprintf(errbuf, errbufsize, "Can't load fromURL from URL class");
     return -6;
   }
-  parv[parc++] = xstrdup(err);
+  parv[parc++] = ats_strdup(err);
   ats_free(err);
 
   if ((err = mp->toUrl.string_get(NULL)) == NULL) {
     snprintf(errbuf, errbufsize, "Can't load toURL from URL class");
     return -6;
   }
-  parv[parc++] = xstrdup(err);
+  parv[parc++] = ats_strdup(err);
   ats_free(err);
 
   bool plugin_encountered = false;

Modified: trafficserver/traffic/trunk/proxy/logging/LogAccess.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogAccess.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogAccess.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogAccess.cc Wed Sep  7 22:47:10 2011
@@ -1271,7 +1271,7 @@ resolve_logfield_string(LogAccess *conte
   //
   if (!n_fields) {
     Debug("log-resolve", "No fields found; returning copy of format_str");
-    return xstrdup(format_str);
+    return ats_strdup(format_str);
   }
 
   Debug("log-resolve", "%d fields: %s", n_fields, fields_str);

Modified: trafficserver/traffic/trunk/proxy/logging/LogBuffer.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogBuffer.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogBuffer.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogBuffer.cc Wed Sep  7 22:47:10 2011
@@ -855,7 +855,7 @@ LogBuffer::to_ascii(LogEntryHeader * ent
     if (fieldlist_cache_entries < FIELDLIST_CACHE_SIZE) {
       Debug("log-fieldlist", "Fieldlist cached as entry %d", fieldlist_cache_entries);
       fieldlist_cache[fieldlist_cache_entries].fieldlist = fieldlist;
-      fieldlist_cache[fieldlist_cache_entries].symbol_str = xstrdup(symbol_str);
+      fieldlist_cache[fieldlist_cache_entries].symbol_str = ats_strdup(symbol_str);
       fieldlist_cache_entries++;
     }
   }

Modified: trafficserver/traffic/trunk/proxy/logging/LogConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogConfig.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogConfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogConfig.cc Wed Sep  7 22:47:10 2011
@@ -106,7 +106,7 @@ LogConfig::setup_default_values()
   if (!gethostname(name, bufSize)) {
     ink_strncpy(name, "unknown_host_name", sizeof(name));
   }
-  hostname = xstrdup(name);
+  hostname = ats_strdup(name);
 
   log_buffer_size = (int) (10 * LOG_KILOBYTE);
   max_entries_per_buffer = 100;
@@ -115,7 +115,7 @@ LogConfig::setup_default_values()
   max_space_mb_for_orphan_logs = 25;
   max_space_mb_headroom = 10;
   logfile_perm = 0644;
-  logfile_dir = xstrdup(".");
+  logfile_dir = ats_strdup(".");
 
   separate_icp_logs = 1;
   separate_host_logs = FALSE;
@@ -123,29 +123,29 @@ LogConfig::setup_default_values()
   squid_log_enabled = TRUE;
   xuid_logging_enabled = TRUE;
   squid_log_is_ascii = TRUE;
-  squid_log_name = xstrdup("squid");
+  squid_log_name = ats_strdup("squid");
   squid_log_header = NULL;
 
   common_log_enabled = FALSE;
   common_log_is_ascii = TRUE;
-  common_log_name = xstrdup("common");
+  common_log_name = ats_strdup("common");
   common_log_header = NULL;
 
   extended_log_enabled = FALSE;
   extended_log_is_ascii = TRUE;
-  extended_log_name = xstrdup("extended");
+  extended_log_name = ats_strdup("extended");
   extended_log_header = NULL;
 
   extended2_log_enabled = FALSE;
   extended2_log_is_ascii = TRUE;
-  extended2_log_name = xstrdup("extended2");
+  extended2_log_name = ats_strdup("extended2");
   extended2_log_header = NULL;
 
   collation_mode = NO_COLLATION;
-  collation_host = xstrdup("none");
+  collation_host = ats_strdup("none");
   collation_port = 0;
   collation_host_tagged = FALSE;
-  collation_secret = xstrdup("foobar");
+  collation_secret = ats_strdup("foobar");
   collation_retry_sec = 0;
   collation_max_send_buffers = 0;
 
@@ -157,8 +157,8 @@ LogConfig::setup_default_values()
   roll_log_files_now = FALSE;
 
   custom_logs_enabled = FALSE;
-  xml_config_file = xstrdup("logs_xml.config");
-  hosts_config_file = xstrdup("log_hosts.config");
+  xml_config_file = ats_strdup("logs_xml.config");
+  hosts_config_file = ats_strdup("log_hosts.config");
 
 /* The default values for the search log                         */
 
@@ -178,9 +178,9 @@ LogConfig::setup_default_values()
 /* containing these strings will not be parsed.                  */
   search_url_filter = NULL;
 /* Logging system captures all the URLs in this log file.        */
-  search_log_file_one = xstrdup("search_log1");
+  search_log_file_one = ats_strdup("search_log1");
 /* Logging system captures only cache miss URLs to this log file.*/
-  search_log_file_two = xstrdup("search_log2");
+  search_log_file_two = ats_strdup("search_log2");
 
   sampling_frequency = 1;
   file_stat_frequency = 16;
@@ -296,7 +296,7 @@ LogConfig::read_configuration_variables(
         fprintf(stderr,"please set 'proxy.config.log.logfile_dir'\n");
         _exit(1);
       }
-      logfile_dir = xstrdup(system_log_dir);
+      logfile_dir = ats_strdup(system_log_dir);
     }
   }
 
@@ -1434,7 +1434,7 @@ LogConfig::update_space_used()
         //
         // then add this entry to the candidate list
         //
-        candidates[candidate_count].name = xstrdup(path);
+        candidates[candidate_count].name = ats_strdup(path);
         candidates[candidate_count].size = (int64_t) sbuf.st_size;
         candidates[candidate_count].mtime = sbuf.st_mtime;
         candidate_count++;
@@ -2246,7 +2246,7 @@ LogConfig::read_log_hosts_file(size_t * 
             continue;
           }
           LogUtils::strip_trailing_newline(line);
-          hosts[i] = xstrdup(line);
+          hosts[i] = ats_strdup(line);
           ++i;
         }
         ink_assert(i == nhosts);

Modified: trafficserver/traffic/trunk/proxy/logging/LogField.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogField.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogField.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogField.cc Wed Sep  7 22:47:10 2011
@@ -69,7 +69,7 @@ const char *aggregate_names[] = {
 
 // Generic field ctor
 LogField::LogField(const char *name, const char *symbol, Type type, MarshalFunc marshal, UnmarshalFunc unmarshal)
-  : m_name(xstrdup(name)), m_symbol(xstrdup(symbol)), m_type(type), m_container(NO_CONTAINER), m_marshal_func(marshal),
+  : m_name(ats_strdup(name)), m_symbol(ats_strdup(symbol)), m_type(type), m_container(NO_CONTAINER), m_marshal_func(marshal),
     m_unmarshal_func(unmarshal), m_unmarshal_func_map(NULL), m_agg_op(NO_AGGREGATE), m_agg_cnt(0), m_agg_val(0),
     m_time_field(false), m_alias_map(0)
 {
@@ -86,7 +86,7 @@ LogField::LogField(const char *name, con
 
 LogField::LogField(const char *name, const char *symbol, Type type,
                    MarshalFunc marshal, UnmarshalFuncWithMap unmarshal, Ptr<LogFieldAliasMap> map)
-  : m_name(xstrdup(name)), m_symbol(xstrdup(symbol)), m_type(type), m_container(NO_CONTAINER), m_marshal_func(marshal),
+  : m_name(ats_strdup(name)), m_symbol(ats_strdup(symbol)), m_type(type), m_container(NO_CONTAINER), m_marshal_func(marshal),
     m_unmarshal_func(NULL), m_unmarshal_func_map(unmarshal), m_agg_op(NO_AGGREGATE), m_agg_cnt(0), m_agg_val(0),
     m_time_field(false), m_alias_map(map)
 {
@@ -104,7 +104,7 @@ LogField::LogField(const char *name, con
 
 // Container field ctor
 LogField::LogField(const char *field, Container container)
-  : m_name(xstrdup(field)), m_symbol(xstrdup(container_names[container])), m_type(LogField::STRING),
+  : m_name(ats_strdup(field)), m_symbol(ats_strdup(container_names[container])), m_type(LogField::STRING),
     m_container(container), m_marshal_func(NULL), m_unmarshal_func(NULL), m_unmarshal_func_map(NULL),
     m_agg_op(NO_AGGREGATE), m_agg_cnt(0), m_agg_val(0), m_time_field(false), m_alias_map(0)
 {
@@ -145,7 +145,7 @@ LogField::LogField(const char *field, Co
 
 // Copy ctor
 LogField::LogField(const LogField &rhs)
-  : m_name(xstrdup(rhs.m_name)), m_symbol(xstrdup(rhs.m_symbol)), m_type(rhs.m_type), m_container(rhs.m_container),
+  : m_name(ats_strdup(rhs.m_name)), m_symbol(ats_strdup(rhs.m_symbol)), m_type(rhs.m_type), m_container(rhs.m_container),
     m_marshal_func(rhs.m_marshal_func), m_unmarshal_func(rhs.m_unmarshal_func), m_unmarshal_func_map(rhs.m_unmarshal_func_map),
     m_agg_op(rhs.m_agg_op), m_agg_cnt(0), m_agg_val(0), m_time_field(rhs.m_time_field), m_alias_map(rhs.m_alias_map)
 {

Modified: trafficserver/traffic/trunk/proxy/logging/LogFieldAliasMap.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogFieldAliasMap.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogFieldAliasMap.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogFieldAliasMap.cc Wed Sep  7 22:47:10 2011
@@ -70,7 +70,7 @@ LogFieldAliasTable::init(size_t numPairs
     size_t i = val - m_min;
     name = va_arg(ap, char *);
 
-    m_table[i].name = xstrdup(name);
+    m_table[i].name = ats_strdup(name);
     m_table[i].length = strlen(name);
     m_table[i].valid = true;
   }

Modified: trafficserver/traffic/trunk/proxy/logging/LogFile.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogFile.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogFile.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogFile.cc Wed Sep  7 22:47:10 2011
@@ -88,14 +88,13 @@ static const int FILESIZE_SAFE_THRESHOLD
 
 LogFile::LogFile(const char *name, const char *header, LogFileFormat format,
                  uint64_t signature, size_t ascii_buffer_size, size_t max_line_size, size_t overspill_report_count)
-  :
-m_file_format(format),
-m_name(xstrdup(name)),
-m_header(xstrdup(header)),
-m_signature(signature),
-m_meta_info(NULL),
-m_max_line_size(max_line_size),
-m_overspill_report_count(overspill_report_count)
+  : m_file_format(format),
+    m_name(ats_strdup(name)),
+    m_header(ats_strdup(header)),
+    m_signature(signature),
+    m_meta_info(NULL),
+    m_max_line_size(max_line_size),
+    m_overspill_report_count(overspill_report_count)
 {
   init();
   m_ascii_buffer_size = (ascii_buffer_size < max_line_size ? max_line_size : ascii_buffer_size);
@@ -161,7 +160,7 @@ void
 LogFile::change_name(char *new_name)
 {
   ats_free(m_name);
-  m_name = xstrdup(new_name);
+  m_name = ats_strdup(new_name);
 }
 
 /*-------------------------------------------------------------------------
@@ -172,7 +171,7 @@ void
 LogFile::change_header(const char *header)
 {
   ats_free(m_header);
-  m_header = xstrdup(header);
+  m_header = ats_strdup(header);
 }
 
 /*-------------------------------------------------------------------------

Modified: trafficserver/traffic/trunk/proxy/logging/LogFilter.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogFilter.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogFilter.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogFilter.cc Wed Sep  7 22:47:10 2011
@@ -54,7 +54,7 @@ const char *LogFilter::ACTION_NAME[] = {
   between the classes and I think should be removed.     ltavera
   -------------------------------------------------------------------------*/
 LogFilter::LogFilter(const char *name, LogField * field, LogFilter::Action action, LogFilter::Operator oper)
-  : m_name(xstrdup(name)), m_field(NULL) , m_action(action), m_operator(oper), m_type(INT_FILTER), m_num_values(0)
+  : m_name(ats_strdup(name)), m_field(NULL) , m_action(action), m_operator(oper), m_type(INT_FILTER), m_num_values(0)
 {
   m_field = NEW(new LogField(*field));
   ink_assert(m_field);
@@ -84,7 +84,7 @@ LogFilterString::_setValues(size_t n, ch
     m_length = NEW(new size_t[n]);
     ink_assert(m_value && m_value_uppercase && m_length);
     for (size_t i = 0; i < n; ++i) {
-      m_value[i] = xstrdup(value[i]);
+      m_value[i] = ats_strdup(value[i]);
       m_length[i] = strlen(value[i]);
       m_value_uppercase[i] = (char *)ats_malloc((unsigned int) m_length[i] + 1);
       size_t j;

Modified: trafficserver/traffic/trunk/proxy/logging/LogFormat.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogFormat.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogFormat.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogFormat.cc Wed Sep  7 22:47:10 2011
@@ -163,7 +163,7 @@ LogFormat::init_variables(const char *na
       m_name_id = 0;
     }
     if (name) {
-      m_name_str = xstrdup(name);
+      m_name_str = ats_strdup(name);
       m_name_id = id_from_name(m_name_str);
     }
 
@@ -173,11 +173,11 @@ LogFormat::init_variables(const char *na
       m_fieldlist_id = 0;
     }
     if (fieldlist_str) {
-      m_fieldlist_str = xstrdup(fieldlist_str);
+      m_fieldlist_str = ats_strdup(fieldlist_str);
       m_fieldlist_id = id_from_name(m_fieldlist_str);
     }
 
-    m_printf_str = xstrdup(printf_str);
+    m_printf_str = ats_strdup(printf_str);
     m_interval_sec = interval_sec;
     m_interval_next = LogUtils::timestamp();
 
@@ -226,7 +226,7 @@ LogFormat::LogFormat(LogFormatType type)
     // indicate this, the format_str will be NULL
     //
   case TEXT_LOG:
-    m_name_str = xstrdup("text");
+    m_name_str = ats_strdup("text");
     m_valid = true;
     break;
   default:
@@ -312,9 +312,9 @@ LogFormat::LogFormat(const LogFormat & r
 {
   if (m_valid) {
     if (m_format_type == TEXT_LOG) {
-      m_name_str = xstrdup(rhs.m_name_str);
+      m_name_str = ats_strdup(rhs.m_name_str);
     } else {
-      m_format_str = rhs.m_format_str ? xstrdup(rhs.m_format_str) : 0;
+      m_format_str = rhs.m_format_str ? ats_strdup(rhs.m_format_str) : 0;
       init_variables(rhs.m_name_str, rhs.m_fieldlist_str, rhs.m_printf_str, rhs.m_interval_sec);
     }
   }
@@ -439,7 +439,7 @@ LogFormat::format_from_specification(cha
     Debug("log-format", "token expected");
     return NULL;
   }
-  *file_name = xstrdup(token);
+  *file_name = ats_strdup(token);
 
   //
   // Next should be the file type, either "ASCII" or "BINARY"
@@ -469,7 +469,7 @@ LogFormat::format_from_specification(cha
   // set header to NULL if "none" was specified (a NULL header means
   // "write no header" to the rest of the logging system)
   //
-  *file_header = strcmp(token, "none") == 0 ? NULL : xstrdup(token);
+  *file_header = strcmp(token, "none") == 0 ? NULL : ats_strdup(token);
 
   Debug("log-format", "custom:%d:%s:%s:%s:%d:%s", format_id, format_name, format_str, *file_name, *file_type, token);
 
@@ -512,7 +512,7 @@ LogFormat::parse_symbol_string(const cha
   //
   // strtok will mangle the input string; we'll make a copy for that.
   //
-  sym_str = xstrdup(symbol_string);
+  sym_str = ats_strdup(symbol_string);
   symbol = strtok(sym_str, ",");
 
   while (symbol != NULL) {

Modified: trafficserver/traffic/trunk/proxy/logging/LogHost.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogHost.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogHost.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogHost.cc Wed Sep  7 22:47:10 2011
@@ -54,7 +54,7 @@
   -------------------------------------------------------------------------*/
 
 LogHost::LogHost(char *object_filename, uint64_t object_signature)
-  : m_object_filename(xstrdup(object_filename))
+  : m_object_filename(ats_strdup(object_filename))
   , m_object_signature(object_signature)
   , m_ip(0)
   , m_ipstr(NULL)
@@ -71,11 +71,11 @@ LogHost::LogHost(char *object_filename, 
 }
 
 LogHost::LogHost(const LogHost & rhs)
-  : m_object_filename(xstrdup(rhs.m_object_filename))
+  : m_object_filename(ats_strdup(rhs.m_object_filename))
   , m_object_signature(rhs.m_object_signature)
   , m_ip(rhs.m_ip)
-  , m_ipstr(xstrdup(rhs.m_ipstr))
-  , m_name(xstrdup(rhs.m_name))
+  , m_ipstr(ats_strdup(rhs.m_ipstr))
+  , m_name(ats_strdup(rhs.m_name))
   , m_port(rhs.m_port)
   , m_sock(NULL)
   , m_sock_fd(-1)
@@ -118,7 +118,7 @@ LogHost::set_name_port(char *hostname, u
   m_ipstr = (char *)ats_malloc(32);
   LogUtils::ip_to_str(m_ip, m_ipstr, 32);
 #endif
-  m_name = xstrdup(hostname);
+  m_name = ats_strdup(hostname);
   m_port = pt;
 
   Debug("log-host", "LogHost established as %s:%u", name(), port());
@@ -138,8 +138,8 @@ LogHost::set_ipstr_port(char *ipstr, uns
   clear();                      // remove all previous state for this LogHost
 
   m_ip = htonl(LogUtils::str_to_ip(ipstr));
-  m_ipstr = xstrdup(ipstr);
-  m_name = xstrdup(ipstr);
+  m_ipstr = ats_strdup(ipstr);
+  m_name = ats_strdup(ipstr);
   m_port = pt;
 
   Debug("log-host", "LogHost established as %s:%u", name(), port());

Modified: trafficserver/traffic/trunk/proxy/logging/LogObject.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogObject.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogObject.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogObject.cc Wed Sep  7 22:47:10 2011
@@ -274,7 +274,7 @@ LogObject::rename(char *new_name)
   // the LogObject to match the new filename.
   //
   ats_free(m_alt_filename);
-  m_alt_filename = xstrdup(new_name);
+  m_alt_filename = ats_strdup(new_name);
   m_logFile->change_name(new_name);
 }
 

Modified: trafficserver/traffic/trunk/proxy/logstats.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logstats.cc?rev=1166456&r1=1166455&r2=1166456&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logstats.cc (original)
+++ trafficserver/traffic/trunk/proxy/logstats.cc Wed Sep  7 22:47:10 2011
@@ -449,7 +449,7 @@ public:
       if (_size > 0)
         _stack.splice(_stack.begin(), _stack, l);
     } else { // "new" URL
-      const char *u = xstrdup(url); // We own it.
+      const char *u = ats_strdup(url); // We own it.
       LruStack::iterator l = _stack.end();
 
       if (_size > 0) {
@@ -1340,7 +1340,7 @@ parse_log_buff(LogBufferHeader * buf_hea
                 o_stats = (OriginStats *)ats_malloc(sizeof(OriginStats));
                 memset(o_stats, 0, sizeof(OriginStats));
                 init_elapsed(o_stats);
-                o_server = xstrdup(tok);
+                o_server = ats_strdup(tok);
                 if (o_stats && o_server) {
                   o_stats->server = o_server;
                   origins[o_server] = o_stats;
@@ -2296,7 +2296,7 @@ main(int argc, char *argv[])
         if (end > start) {
           char *buf;
 
-          buf = xstrdup(line.substr(start, end).c_str());
+          buf = ats_strdup(line.substr(start, end).c_str());
           if (buf)
             origin_set->insert(buf);
         }



Mime
View raw message