You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by mt...@apache.org on 2010/05/13 09:09:56 UTC

svn commit: r943821 [11/18] - in /trafficserver/traffic/trunk: example/add-header/ example/app-template/ example/append-transform/ example/basic-auth/ example/blacklist-0/ example/blacklist-1/ example/bnull-transform/ example/cache_scan/ example/file-1...

Modified: trafficserver/traffic/trunk/proxy/mgmt2/MultiFile.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/MultiFile.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/MultiFile.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/MultiFile.cc Thu May 13 07:09:39 2010
@@ -41,8 +41,8 @@
  *
  *  MultiFile.cc - base class to handle reading and displaying config
  *                 files and directories
- *  
- * 
+ *
+ *
  ****************************************************************************/
 
 MultiFile::MultiFile()
@@ -88,7 +88,7 @@ MultiFile::addTableEntries(ExpandingArra
 
 }
 
-// Mfresult MultiFile::WalkFiles(ExpandingArray* fileList) 
+// Mfresult MultiFile::WalkFiles(ExpandingArray* fileList)
 //
 //   Iterates through the managed directory and adds every managed file
 //     into the parameter snapList
@@ -220,12 +220,12 @@ MultiFile::addSelectOptions(textBuffer *
   output->copyFrom(selectEnd, strlen(selectEnd));
 }
 
-//  int fileEntryCmpFunc(void* e1, void* e2) 
-//  
+//  int fileEntryCmpFunc(void* e1, void* e2)
+//
 //  a cmp function for fileEntry structs that can
 //     used with qsort
 //
-//  compares c_time 
+//  compares c_time
 //
 int
 fileEntryCmpFunc(const void *e1, const void *e2)

Modified: trafficserver/traffic/trunk/proxy/mgmt2/MultiFile.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/MultiFile.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/MultiFile.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/MultiFile.h Thu May 13 07:09:39 2010
@@ -28,8 +28,8 @@
  *
  *  MultiFile.h - base class to handle reading and displaying config
  *                 files and directories
- *  
- * 
+ *
+ *
  ****************************************************************************/
 
 //#include "inktomi++.h"

Modified: trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc Thu May 13 07:09:39 2010
@@ -29,7 +29,7 @@
  *
  * $Date: 2007-10-05 16:56:44 $
  *
- * 
+ *
  */
 
 #include "inktomi++.h"
@@ -492,8 +492,8 @@ ProcessManager::addPluginString(const ch
 static bool checkBackDoorP(int req_fd, char *message);
 /*
  * drainBackDoor(...)
- *   This function is blocking, it never returns. It is meant to allow for 
- * continuous draining of the network. 
+ *   This function is blocking, it never returns. It is meant to allow for
+ * continuous draining of the network.
  */
 static void *
 drainBackDoor(void *arg)

Modified: trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.h Thu May 13 07:09:39 2010
@@ -30,7 +30,7 @@
  *
  * $Date: 2003-06-01 18:37:18 $
  *
- * 
+ *
  */
 
 #ifndef _PROCESS_MANAGER_H

Modified: trafficserver/traffic/trunk/proxy/mgmt2/ProcessRecords.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/ProcessRecords.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/ProcessRecords.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/ProcessRecords.cc Thu May 13 07:09:39 2010
@@ -29,7 +29,7 @@
  *
  * $Date: 2003-06-01 18:37:18 $
  *
- * 
+ *
  */
 
 #include "ink_config.h"

Modified: trafficserver/traffic/trunk/proxy/mgmt2/ProcessRecords.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/ProcessRecords.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/ProcessRecords.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/ProcessRecords.h Thu May 13 07:09:39 2010
@@ -25,12 +25,12 @@
  *
  * ProcessRecords.h
  *   Process Records Class, derived from BaseRecords. Class provides access
- * to configuration information to proxy processes and records/updates 
+ * to configuration information to proxy processes and records/updates
  * statistics information for sharing with the outside world.
  *
  * $Date: 2003-06-01 18:37:18 $
  *
- * 
+ *
  */
 
 #ifndef _PROCESS_RECORDS_H
@@ -71,7 +71,7 @@ public:
 
   /*
    * readConfig*(...)
-   *   Read functions provide read access to config information. 
+   *   Read functions provide read access to config information.
    *
    * Returns:    data             impossible to gauge success from this, if
    *                              concerned pass in bool flag(true on success).
@@ -88,7 +88,7 @@ public:
 
   /*
    * readConfig*(...)
-   *   Read functions provide read access to local node information. 
+   *   Read functions provide read access to local node information.
    *
    * Returns:    data             impossible to gauge success from this, if
    *                              concerned pass in bool flag(true on success).

Modified: trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc Thu May 13 07:09:39 2010
@@ -173,15 +173,15 @@ RecordElement RecordsConfig[] = {
   //#
   //# Connection Collapsing
   //#
-  //# 1. hashtable_enabled: if set to 1, requests will first search the 
+  //# 1. hashtable_enabled: if set to 1, requests will first search the
   //#    hashtable to see if another similar request is already being served.
-  //# 2. rww_wait_time: read-while-write wait time: While read while write is 
+  //# 2. rww_wait_time: read-while-write wait time: While read while write is
   //#    enabled, the secondary clients will wait this amount of time after which
   //#    cache lookup is retried.
-  //# 3. revaildate_window_period: while revaidation of a cached object is being 
+  //# 3. revaildate_window_period: while revaidation of a cached object is being
   //#    done, the secondary clients for the same url will serve the stale object for
   //#    this amount of time, after the revalidation had started.
-  //#  
+  //#
   //##############################################################################
 
   {CONFIG, "proxy.config.connection_collapsing.hashtable_enabled", "", INK_INT, "0", RU_REREAD, RR_NULL, RC_INT,
@@ -196,7 +196,7 @@ RecordElement RecordsConfig[] = {
 
   //##############################################################################
   //#
-  //# Support for SRV records 
+  //# Support for SRV records
   //#
   //##############################################################################
   {CONFIG, "proxy.config.srv_enabled", "", INK_INT, "0", RU_REREAD, RR_NULL, RC_INT, "[0-1]", RA_NULL}
@@ -204,7 +204,7 @@ RecordElement RecordsConfig[] = {
 
   //##############################################################################
   //#
-  //# Support for disabling check for Accept-* / Content-* header mismatch 
+  //# Support for disabling check for Accept-* / Content-* header mismatch
   //#
   //##############################################################################
   {CONFIG, "proxy.config.http.cache.ignore_accept_mismatch", "", INK_INT, "0", RU_REREAD, RR_NULL, RC_INT, "[0-1]",
@@ -222,10 +222,10 @@ RecordElement RecordsConfig[] = {
 
   //##############################################################################
   //#
-  //# Redirection 
+  //# Redirection
   //#
   //# 1. redirection_enabled: if set to 1, redirection is enabled.
-  //# 2. number_of_redirectionse: The maximum number of redirections TS permits 
+  //# 2. number_of_redirectionse: The maximum number of redirections TS permits
   //# 3. post_copy_size: The maximum POST data size TS permits to copy
   //#
   //##############################################################################
@@ -1149,7 +1149,7 @@ RecordElement RecordsConfig[] = {
    RA_NULL}
   ,
   //       # cache responses to cookies has 4 options
-  //       # 
+  //       #
   //       #  0 - do not cache any responses to cookies
   //       #  1 - cache for any content-type (ignore cookies)
   //       #  2 - cache only for image types
@@ -2241,7 +2241,7 @@ RecordElement RecordsConfig[] = {
   ,
   {PROCESS, "proxy.process.cache.hdr_marshal_bytes", "", INK_INT, "0", RU_NULL, RR_NULL, RC_NULL, NULL, RA_NULL}
   ,
-  // Disk Stats 
+  // Disk Stats
   {PROCESS, "proxy.process.cache.read_per_sec", "", INK_FLOAT, "0", RU_NULL, RR_NULL, RC_NULL, NULL, RA_NULL}
   ,
   {PROCESS, "proxy.process.cache.KB_read_per_sec", "", INK_FLOAT, "0", RU_NULL, RR_NULL, RC_NULL, NULL, RA_NULL}
@@ -2333,7 +2333,7 @@ RecordElement RecordsConfig[] = {
   ,
   {CONFIG, "proxy.config.hostdb.serve_stale_for", "", INK_INT, "0", RU_REREAD, RR_NULL, RC_NULL, NULL, RA_NULL}
   ,
-  //       # move entries to the owner on a lookup?  
+  //       # move entries to the owner on a lookup?
   {CONFIG, "proxy.config.hostdb.migrate_on_demand", "", INK_INT, "0", RU_REREAD, RR_NULL, RC_NULL, NULL, RA_NULL}
   ,
   //       # find DNS results on another node in the cluster?
@@ -2342,7 +2342,7 @@ RecordElement RecordsConfig[] = {
   //       # find DNS results for round-robin hosts on another node in the cluster?
   {CONFIG, "proxy.config.hostdb.cluster.round_robin", "", INK_INT, "0", RU_REREAD, RR_NULL, RC_NULL, NULL, RA_NULL}
   ,
-  //       # round-robin addresses for single clients 
+  //       # round-robin addresses for single clients
   //       # (can cause authentication problems)
   {CONFIG, "proxy.config.hostdb.strict_round_robin", "", INK_INT, "0", RU_REREAD, RR_NULL, RC_NULL, NULL, RA_NULL}
   ,
@@ -4143,7 +4143,7 @@ RecordElement RecordsConfig[] = {
   //############
   //#
   //# Eric's super cool remap processor
-  //# 
+  //#
   //############
   {CONFIG, "proxy.config.remap.use_remap_processor", "", INK_INT, "0", RU_NULL, RR_NULL, RC_NULL, NULL, RA_NULL}
   ,

Modified: trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.h Thu May 13 07:09:39 2010
@@ -34,7 +34,7 @@
 enum RecordUpdateType
 {
   RU_NULL,                      // default: don't know the behavior
-  RU_REREAD,                    // config can be updated dynamically w/ traffic_line -x 
+  RU_REREAD,                    // config can be updated dynamically w/ traffic_line -x
   RU_RESTART_TS,                // config requires TS to be restarted to take effect
   RU_RESTART_TM,                // config requires TM/TS to be restarted to take effect
   RU_RESTART_TC                 // config requires TC/TM/TS to be restarted to take effect
@@ -58,7 +58,7 @@ enum RecordAccessType
 {
   RA_NULL,                      // default: no access type defined
   RA_NO_ACCESS,                 // config cannot be read or set
-  RA_READ_ONLY                  // config can only be read 
+  RA_READ_ONLY                  // config can only be read
 };
 
 // Retain this struct for ease of CVS merging
@@ -73,7 +73,7 @@ struct RecordElement
   RecordRequiredType required;  // is records required to be in records.config?
   RecordCheckType check;
   const char *regex;
-  RecordAccessType access;      // access level of the record 
+  RecordAccessType access;      // access level of the record
 };
 
 extern RecordElement RecordsConfig[];   // big struct of all system records

Modified: trafficserver/traffic/trunk/proxy/mgmt2/Rollback.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/Rollback.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/Rollback.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/Rollback.cc Thu May 13 07:09:39 2010
@@ -35,8 +35,8 @@
  *
  *  Rollback.cc - code  for class to allow rollback of configuration
  *                  files
- *  
- * 
+ *
+ *
  ****************************************************************************/
 
 #define MAX_VERSION_DIGITS 11
@@ -86,9 +86,9 @@ root_access_needed(root_access_needed_)
   }
 
   if ((err = stat(configTmp, &s)) < 0) {
-    ink_strncpy(configTmp, system_config_directory,PATH_NAME_MAX); 
+    ink_strncpy(configTmp, system_config_directory,PATH_NAME_MAX);
     if ((err = stat(configTmp, &s)) < 0) {
-        mgmt_elog("[Rollback::Rollback] unable to stat() directory '%s': %d %d, %s\n", 
+        mgmt_elog("[Rollback::Rollback] unable to stat() directory '%s': %d %d, %s\n",
                 mgmt_path, err, errno, strerror(errno));
         mgmt_elog("[Rollback::Rollback] please set config path via command line '-path <path>' or 'proxy.config.config_dir' \n");
         _exit(1);
@@ -124,7 +124,7 @@ root_access_needed(root_access_needed_)
 
     // If we can't find an active version because there is not
     //   one, attempt to rollback to a previous verision if one exists
-    // 
+    //
     // If it does not, create a zero length file to prevent total havoc
     //
     if (errno == ENOENT) {
@@ -308,7 +308,7 @@ Rollback::statFile(version_t version, st
   return statResult;
 }
 
-// 
+//
 // int Rollback::openFile(version_t)
 //
 //  a wrapper for open()
@@ -586,7 +586,7 @@ UPDATE_CLEANUP:
     lmgmt->alarm_keeper->signalAlarm(MGMT_ALARM_CONFIG_UPDATE_FAILED, alarmMsg);
     xfree(alarmMsg);
 
-    // Remove both the link from currentVersion_local 
+    // Remove both the link from currentVersion_local
     // to the active version and the new version
     //  that they will not screw up our version id on restart
     unlink(currentVersion_local);
@@ -622,7 +622,7 @@ Rollback::getVersion_ml(version_t versio
   int diskFD;                   // file descriptor for version of the file we are fetching
   RollBackCodes returnCode;     // our eventual return value
   struct stat fileInfo;         // Info from fstat
-  int readResult;               // return val of (indirect) read calls 
+  int readResult;               // return val of (indirect) read calls
   textBuffer *newBuffer;        // return buffer
 
   *buffer = NULL;
@@ -650,7 +650,7 @@ Rollback::getVersion_ml(version_t versio
     returnCode = FILE_NOT_FOUND_ROLLBACK;
     goto GET_CLEANUP;
   }
-  // Create a textbuffer of the 
+  // Create a textbuffer of the
   newBuffer = new textBuffer(fileInfo.st_size + 1);
 
   do {
@@ -746,7 +746,7 @@ Rollback::findVersions(ExpandingArray * 
 // Rollback::findVersions_ml()
 //
 // scans the configuration directory and returns the high
-//   version number encountered.  If no versions of the 
+//   version number encountered.  If no versions of the
 //   file were found, zero is returned
 //
 version_t
@@ -855,7 +855,7 @@ Rollback::extractVersionInfo(ExpandingAr
   if (strlen(testFileName) > fileNameLen) {
     if (strncmp(testFileName, fileName, fileNameLen) == 0) {
 
-      // Check for the underscore 
+      // Check for the underscore
       if (*(testFileName + fileNameLen) == '_') {
         // Check for the integer version number
         currentVersionStr = str = testFileName + fileNameLen + 1;
@@ -868,7 +868,7 @@ Rollback::extractVersionInfo(ExpandingAr
 
           version = atoi(currentVersionStr);
 
-          // Add info about version number and modTime 
+          // Add info about version number and modTime
           if (listNames != NULL) {
             struct stat fileInfo;
             versionInfo *verInfo;
@@ -889,7 +889,7 @@ Rollback::extractVersionInfo(ExpandingAr
 }
 
 // version_t Rollback::findVersions_ml(Queue<versionInfo>& q)
-// 
+//
 //   Add wrapper to
 //     version_t Rollback::findVersions_ml(ExpandingArray* listNames)
 //

Modified: trafficserver/traffic/trunk/proxy/mgmt2/Rollback.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/Rollback.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/Rollback.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/Rollback.h Thu May 13 07:09:39 2010
@@ -28,8 +28,8 @@
  *
  *  Rollback.h - Interface for class to allow rollback of configuration
  *                  files
- *  
- * 
+ *
+ *
  ****************************************************************************/
 
 #include "ink_platform.h"
@@ -65,7 +65,7 @@ struct versionInfo
 //  class Rollback
 //
 //  public functions
-//   
+//
 //  _ml functions assume the callee is handling locking issues
 //    via acquireLock() and releaseLock().  The non _ml
 //    simply grab the lock, call the corresponding _ml function,
@@ -84,10 +84,10 @@ struct versionInfo
 //  updateVersion(textBuffer* buf, version_t basedOn) - checks to
 //    if basedOn is the current version.  If it is not, the update
 //    rejected.  If it is current, the active file is versioned and
-//    the contents of buf become the new active file. newVersion tells us what 
+//    the contents of buf become the new active file. newVersion tells us what
 //    the new version number should be.  -1 means the next in sequence
 //
-//  forceUpdate(textBuffer* buf, version_t) - Does not check is the new version 
+//  forceUpdate(textBuffer* buf, version_t) - Does not check is the new version
 //    is based on the current version, which can lead to data loss.  versions
 //    the active file and places the contents of buf into the active file
 //
@@ -96,7 +96,7 @@ struct versionInfo
 //    a snap shot in time
 //
 //  numberOfVersions() - returns the number of versions in the config dir.
-//    Unless the callee was acquired the fileAccessLock, the return value 
+//    Unless the callee was acquired the fileAccessLock, the return value
 //    only represents a snap shot in time
 //
 //  checkForUserUpdate() - compares the last known modification time
@@ -176,7 +176,7 @@ public:
   int statVersion(version_t, struct stat *buf);
 
   // Lock not necessary since these are only valid for a
-  //  snap shot in time 
+  //  snap shot in time
   version_t getCurrentVersion()
   {
     return currentVersion;

Modified: trafficserver/traffic/trunk/proxy/mgmt2/StatAggregation.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/StatAggregation.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/StatAggregation.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/StatAggregation.cc Thu May 13 07:09:39 2010
@@ -198,11 +198,11 @@ Ag_cacheHits()
   // the position in this array is significant, hardcoded, and inter-related
   static StatTwoIntSamples miss_count_table[] = {
     {"proxy.process.http.cache_miss_cold", 0, 0, 0, 0}, // 0
-    {"proxy.process.http.cache_miss_changed", 0, 0, 0, 0},      // 1 
+    {"proxy.process.http.cache_miss_changed", 0, 0, 0, 0},      // 1
     {"proxy.process.http.cache_miss_not_cacheable", 0, 0, 0, 0},        // 2
     {"proxy.process.http.cache_miss_client_no_cache", 0, 0, 0, 0},      // 3
     {"proxy.process.http.cache_miss_ims", 0, 0, 0, 0},  // 4
-    {"proxy.process.http.cache_read_error", 0, 0, 0, 0},        // 5 
+    {"proxy.process.http.cache_read_error", 0, 0, 0, 0},        // 5
     {"proxy.process.rni.block_miss_count", 0, 0, 0, 0}, // 6
     {NULL, -1, -1, -1, -1}
   };
@@ -220,7 +220,7 @@ Ag_cacheHits()
   // the position in this array is significant and hardcoded
   static const char *miss_counts_names[] = {
     "proxy.node.http.cache_miss_cold_avg_10s",  // 0
-    "proxy.node.http.cache_miss_changed_avg_10s",       // 1 
+    "proxy.node.http.cache_miss_changed_avg_10s",       // 1
     "proxy.node.http.cache_miss_not_cacheable_avg_10s", // 2
     "proxy.node.http.cache_miss_client_no_cache_avg_10s",       // 3
     "proxy.node.http.cache_miss_ims_avg_10s",   // 4
@@ -685,7 +685,7 @@ Ag_Throughput()
   // These aren't used.
   //static MgmtInt lastBytesHttpUAThrough;
   //static MgmtInt lastBytesHttpOSThrough;
-  //static MgmtInt lastBytesRNIUAThrough; 
+  //static MgmtInt lastBytesRNIUAThrough;
   MgmtInt bytesThrough;
   MgmtInt bytesHttpUAThrough;
   MgmtInt bytesHttpOSThrough;
@@ -738,7 +738,7 @@ Ag_Throughput()
     } else {
       // old stat
       varSetInt("proxy.node.http.throughput", -20);
-      // new stats 
+      // new stats
       varSetFloat("proxy.node.client_throughput_out", -20.0);
     }
   }
@@ -925,7 +925,7 @@ Ag_Connections()
 //        Currently only reflects HTTP
 //
 // NOTE: 8/21/98 (Bug INKqa03094)
-//       A special scenario is considered in this code where during fresh 
+//       A special scenario is considered in this code where during fresh
 //       cache start and no documents are in the cache, the number of bytes sent
 //       to the Origin servers can exceed the number of bytes sent to
 //       the client where by negative bandwidth savings are reported.

Modified: trafficserver/traffic/trunk/proxy/mgmt2/StatAggregation.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/StatAggregation.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/StatAggregation.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/StatAggregation.h Thu May 13 07:09:39 2010
@@ -28,8 +28,8 @@
  *
  *  StatAggregation.h - Functions for computing node and cluster stat
  *                          aggregation
- *  
- * 
+ *
+ *
  ****************************************************************************/
 
 /****************************************************************************

Modified: trafficserver/traffic/trunk/proxy/mgmt2/WebPluginList.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/WebPluginList.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/WebPluginList.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/WebPluginList.cc Thu May 13 07:09:39 2010
@@ -29,8 +29,8 @@
  *
  *  WebPluginList.cc - Keep track of a list of web configurable plugins
  *
- *  
- * 
+ *
+ *
  ****************************************************************************/
 
 WebPluginList::WebPluginList(void)

Modified: trafficserver/traffic/trunk/proxy/mgmt2/WebPluginList.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/WebPluginList.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/WebPluginList.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/WebPluginList.h Thu May 13 07:09:39 2010
@@ -28,8 +28,8 @@
  *
  *  WebPluginList.h - Keep track of a list of web configurable plugins
  *
- *  
- * 
+ *
+ *
  ****************************************************************************/
 
 #include "ink_platform.h"

Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextDefs.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextDefs.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextDefs.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextDefs.h Thu May 13 07:09:39 2010
@@ -54,9 +54,9 @@
 #define IP_END_DELIMITER     "#"
 #define LIST_DELIMITER       ", "
 
-/* Each opaque List handle in the INKMgmtAPI should have 
- * a corresponding typedef here. Using LLQ's to implement the 
- * lists 
+/* Each opaque List handle in the INKMgmtAPI should have
+ * a corresponding typedef here. Using LLQ's to implement the
+ * lists
  */
 typedef LLQ PortList;
 typedef LLQ IpAddrList;

Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextImpl.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextImpl.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextImpl.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextImpl.cc Thu May 13 07:09:39 2010
@@ -265,7 +265,7 @@ CacheObj::CacheObj(TokenList * tokens)
     // must have a time specified
     if (strcmp(tok->name, "pin-in-cache") != 0 && strcmp(tok->name, "revalidate") != 0 &&
         strcmp(tok->name, "ttl-in-cache") != 0) {
-      goto FORMAT_ERR;          // wrong token!! 
+      goto FORMAT_ERR;          // wrong token!!
     }
     if (string_to_hms_time(tok->value, &(m_ele->time_period)) != INK_ERR_OKAY) {
       goto FORMAT_ERR;
@@ -506,7 +506,7 @@ CongestionObj::~CongestionObj()
 
 //
 // will always print defaults in the rule
-// 
+//
 char *
 CongestionObj::formatEleToRule()
 {
@@ -659,7 +659,7 @@ FilterObj::FilterObj(TokenList * tokens)
     goto FORMAT_ERR;
 
 
-  // must have another token 
+  // must have another token
   tok = tokens->next(tok);
   if (!tok || !tok->value)
     goto FORMAT_ERR;
@@ -745,7 +745,7 @@ FilterObj::FilterObj(TokenList * tokens)
       tok = tokens->next(tok);
     }
   } else {
-    // Sanity check -- should have no more token 
+    // Sanity check -- should have no more token
     if (tokens->next(tok)) {
       goto FORMAT_ERR;
     }
@@ -1166,7 +1166,7 @@ bool HostingObj::isValid()
     m_valid = false;
     goto Lend;
   }
-  // check that each partition is between 1-255 
+  // check that each partition is between 1-255
   len = INKIntListLen(m_ele->partitions);
   for (i = 0; i < len; i++) {
     part = INKIntListDequeue(m_ele->partitions);
@@ -1392,7 +1392,7 @@ bool IcpObj::isValid()
   if (m_ele->peer_host_ip_addr && !ccu_checkIpAddr(m_ele->peer_host_ip_addr)) {
     m_valid = false;
   }
-  // check valid cache type       
+  // check valid cache type
   if (m_ele->peer_type == INK_ICP_UNDEFINED) {
     m_valid = false;
   }
@@ -1404,7 +1404,7 @@ bool IcpObj::isValid()
   if (!ccu_checkPortNum(m_ele->peer_icp_port)) {
     m_valid = false;
   }
-  // check valid multicast values: mc_ttl, mc_ip, if enabled 
+  // check valid multicast values: mc_ttl, mc_ip, if enabled
   if (m_ele->is_multicast) {
     // a valid multicast address must be between 224.0.0.0-239.255.255.255
     if (!ccu_checkIpAddr(m_ele->mc_ip_addr, "224.0.0.0", "239.255.255.255") || m_ele->mc_ttl == INK_MC_TTL_UNDEFINED)
@@ -1671,7 +1671,7 @@ bool MgmtAllowObj::isValid()
   if (m_ele->cfg_ele.error != INK_ERR_OKAY) {
     m_valid = false;
   }
-  // must specify source IP addr 
+  // must specify source IP addr
   if (!m_ele->src_ip_addr) {
     m_valid = false;
   }
@@ -1943,7 +1943,7 @@ PartitionObj::PartitionObj(TokenList * t
   if (strcmp(token->name, "size") || !token->value) {
     goto FORMAT_ERR;
   }
-  // CAUTION: we may need a tigher error check 
+  // CAUTION: we may need a tigher error check
   if (strstr(token->value, "%")) {
     m_ele->size_format = INK_SIZE_FMT_PERCENT;
   } else {
@@ -2128,7 +2128,7 @@ bool PluginObj::isValid()
   if (m_ele->cfg_ele.error != INK_ERR_OKAY) {
     m_valid = false;
   }
-  // check plugin name 
+  // check plugin name
   if (!m_ele->name || strcmp(m_ele->name, "") == 0) {
     m_valid = false;
   }
@@ -2298,7 +2298,7 @@ RemapObj::RemapObj(TokenList * tokens)
     }
   }
 
-  // Optional MIXT tag 
+  // Optional MIXT tag
   token = tokens->next(token);
   if (token) {
     if (!token->name) {
@@ -2543,7 +2543,7 @@ SocksObj::SocksObj(TokenList * tokens)
   if (m_ele->cfg_ele.type == INK_TYPE_UNDEFINED) {
     goto FORMAT_ERR;
   }
-  // Determine if it's  a "no-socks" rule or a "parent socks servers" rule 
+  // Determine if it's  a "no-socks" rule or a "parent socks servers" rule
   tok = tokens->first();
   if (strcmp(tok->name, "no_socks") == 0) {     // no-socks rule; INK_SOCKS_BYPASS
 
@@ -2568,8 +2568,8 @@ SocksObj::SocksObj(TokenList * tokens)
     } else {
       goto FORMAT_ERR;
     }
-  } else {                      // multiple socks servers rule; INK_SOCKS_MULTIPLE 
-    // should be dest_ip tag 
+  } else {                      // multiple socks servers rule; INK_SOCKS_MULTIPLE
+    // should be dest_ip tag
     if (strcmp(tok->name, "dest_ip") == 0) {
       m_ele->dest_ip_addr = string_to_ip_addr_ele(tok->value);
     } else {
@@ -2602,7 +2602,7 @@ SocksObj::SocksObj(TokenList * tokens)
         }
         m_ele->socks_servers = string_to_domain_list(tok->value, ";");
       }
-    }                           // end for loop 
+    }                           // end for loop
 
   }
 
@@ -2628,7 +2628,7 @@ SocksObj::formatEleToRule()
   char buf[MAX_RULE_SIZE];
   memset(buf, 0, MAX_RULE_SIZE);
 
-  if (m_ele->ip_addrs != NULL) {        // INK_SOCKS_BYPASS rule 
+  if (m_ele->ip_addrs != NULL) {        // INK_SOCKS_BYPASS rule
     char *str_list = ip_addr_list_to_string((LLQ *) m_ele->ip_addrs, ",");
     if (str_list) {
       snprintf(buf, sizeof(buf), "no_socks %s", str_list);
@@ -2636,10 +2636,10 @@ SocksObj::formatEleToRule()
     } else {
       return NULL;              // invalid ip_addr_list
     }
-  } else if (m_ele->username != NULL) { // INK_SOCKS_AUTH rule 
+  } else if (m_ele->username != NULL) { // INK_SOCKS_AUTH rule
     snprintf(buf, sizeof(buf), "auth u %s %s", m_ele->username, m_ele->password);
-  } else {                      // INK_SOCKS_MULTIPLE rule 
-    // destination ip 
+  } else {                      // INK_SOCKS_MULTIPLE rule
+    // destination ip
     char *ip_str = ip_addr_ele_to_string((INKIpAddrEle *) m_ele->dest_ip_addr);
     if (ip_str) {
       strncat(buf, "dest_ip=", sizeof(buf) - strlen(buf) - 1);
@@ -2692,9 +2692,9 @@ SocksObj::formatEleToRule()
   return xstrdup(buf);
 }
 
-// the rule must either have an ip addr list (exclusive) OR 
-// the dest_ip_addr * socks_servers OR 
-// the username and password 
+// the rule must either have an ip addr list (exclusive) OR
+// the dest_ip_addr * socks_servers OR
+// the username and password
 bool SocksObj::isValid()
 {
   if (m_ele->cfg_ele.error != INK_ERR_OKAY) {
@@ -2947,7 +2947,7 @@ bool SplitDnsObj::isValid()
   if (!INKDomainListIsValid(m_ele->dns_servers_addrs)) {
     m_valid = false;
   }
-  // search_list is optional 
+  // search_list is optional
   if (m_ele->search_list && !INKDomainListIsValid(m_ele->search_list)) {
     m_valid = false;
   }
@@ -3155,13 +3155,13 @@ bool UpdateObj::isValid()
   if (m_ele->cfg_ele.error != INK_ERR_OKAY) {
     m_valid = false;
   }
-  // check url 
+  // check url
   if (!m_ele->url || strcmp(m_ele->url, "") == 0 ||
       strstr(m_ele->url, "\\") ||
       (!strstr(m_ele->url, "http") && !strstr(m_ele->url, "rtsp"))) {
     m_valid = false;
   }
-  // bug 49322: check that there are no "\" in the url or headers 
+  // bug 49322: check that there are no "\" in the url or headers
   char *
     list_str = string_list_to_string(m_ele->headers, ";");
   if (list_str) {
@@ -3169,7 +3169,7 @@ bool UpdateObj::isValid()
       m_valid = false;
     xfree(list_str);
   }
-  // offset hour range is 00-23 
+  // offset hour range is 00-23
   if (m_ele->offset_hour < 0 || m_ele->offset_hour > 23)
     m_valid = false;
 
@@ -3328,7 +3328,7 @@ CfgContext::~CfgContext()
 INKError CfgContext::addEle(CfgEleObj * ele)
 {
   ink_assert(ele != NULL);
-  m_eles.enqueue(ele);          // enqueue CfgEleObj at end of Queue 
+  m_eles.enqueue(ele);          // enqueue CfgEleObj at end of Queue
   return INK_ERR_OKAY;
 }
 

Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextImpl.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextImpl.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextImpl.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextImpl.h Thu May 13 07:09:39 2010
@@ -24,7 +24,7 @@
 /***********************************************************************
  * CfgContext.h
  *
- * Describes the CfgContext class. CfgContext has file name and set of Ele's 
+ * Describes the CfgContext class. CfgContext has file name and set of Ele's
  ***********************************************************************/
 
 #ifndef _CFG_CONTEXT_IMPL_H_
@@ -38,14 +38,14 @@
 
 
 /**********************************************************************
- * CfgEleObj 
- * 
- * abstract base class; basic element in a CfgContext 
+ * CfgEleObj
+ *
+ * abstract base class; basic element in a CfgContext
  **********************************************************************/
 class CfgEleObj
 {
 public:
-  /* Each subclass must provide two constructors: 
+  /* Each subclass must provide two constructors:
      using INK<file>Ele or a TokenList */
 
   virtual ~ CfgEleObj()
@@ -67,15 +67,15 @@ protected:
 };
 
 /********************************************************************
- * Ele Subclasses 
+ * Ele Subclasses
  ********************************************************************/
 /* Each subclass can be constructed from a TokenList (creates the Ele)
  * or from passing in the Ele itself. Typically, objects with dynamically
- * allocated memory should also have a copy constructor and an 
+ * allocated memory should also have a copy constructor and an
  * overloaded assignment operator. However, sine these subclasses function
  * more as wrappers for the C based Ele structs, we only require that
- * each subclass implements a function which returns a dynamic copy of 
- * its m_ele data member 
+ * each subclass implements a function which returns a dynamic copy of
+ * its m_ele data member
  */
 
 /* CommentEle */

Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextManager.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextManager.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextManager.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextManager.cc Thu May 13 07:09:39 2010
@@ -24,12 +24,12 @@
 /*****************************************************************************
  * Filename: ContextManager.cc
  * ------------------------------------------------------------------------
- * Purpose: 
+ * Purpose:
  * 1) CfgContext class manipulations
  * 2) conversions from parser value tags into Ele value format
  *
  * Created by: Lan Tran
- * 
+ *
  ***************************************************************************/
 #include "ink_config.h"
 #include "ink_platform.h"
@@ -48,7 +48,7 @@
  * CfgContextCreate
  * ---------------------------------------------------------------
  * Allocates memory for a CfgContext struct and initializes its members.
- * Must pass in a valid file name type; INK_FNAME_UNDEFINED is 
+ * Must pass in a valid file name type; INK_FNAME_UNDEFINED is
  * considered valid.
  */
 CfgContext *
@@ -60,8 +60,8 @@ CfgContextCreate(INKFileNameT file)
 }
 
 /* ---------------------------------------------------------------
- * CfgContextDestroy 
- * --------------------------------------------------------------- 
+ * CfgContextDestroy
+ * ---------------------------------------------------------------
  * frees all memory allocated for the CfgContext
  */
 INKError
@@ -74,13 +74,13 @@ CfgContextDestroy(CfgContext * ctx)
 }
 
 /* ---------------------------------------------------------------
- * CfgContextCommit 
- * --------------------------------------------------------------- 
- * Convert CfgContext into file, and write the file. 
+ * CfgContextCommit
+ * ---------------------------------------------------------------
+ * Convert CfgContext into file, and write the file.
  * Return INK_ERR_FAIL if completely fail to commit changes (eg.
  * write new file). Returns INK_ERR_INVALID_CONFIG_RULE if succeeded
- * in commiting changes, but at least one rule was invalid. 
- * errRules is an optional argument - if specified, then a 
+ * in commiting changes, but at least one rule was invalid.
+ * errRules is an optional argument - if specified, then a
  * list of the indices of the invalid rules will be stored in it
  */
 INKError
@@ -147,11 +147,11 @@ CfgContextCommit(CfgContext * ctx, LLQ *
 
 
 /* ---------------------------------------------------------------
- * CfgContextGet 
- * --------------------------------------------------------------- 
- * Read the file, get a copy of it, parse the file, convert the 
- * parse structure into ones which will be stored by ctx. The 
- * ctx should also store the version number of the file being read.   
+ * CfgContextGet
+ * ---------------------------------------------------------------
+ * Read the file, get a copy of it, parse the file, convert the
+ * parse structure into ones which will be stored by ctx. The
+ * ctx should also store the version number of the file being read.
  * If invalid rule, it is skipped and not added to the CfgContext.
  */
 INKError
@@ -167,7 +167,7 @@ CfgContextGet(CfgContext * ctx)
   if (!ctx)
     return INK_ERR_PARAMS;
 
-  // get copy of the file 
+  // get copy of the file
   ret = ReadFile(ctx->getFilename(), &old_text, &size, &ver);
   if (ret != INK_ERR_OKAY) {
     if (old_text && strcmp(old_text, "") != 0)
@@ -238,8 +238,8 @@ CfgContextGetCount(CfgContext * ctx)
  * CfgContextGetObjAt
  *--------------------------------------------------------------
  * user must typecast the INKCfgObj to appropriate INKObj before using;
- * iterate through the CfgContext, until the count of NON-Comment ObjObj's 
- * equals index specified (remember to start counting from 0) 
+ * iterate through the CfgContext, until the count of NON-Comment ObjObj's
+ * equals index specified (remember to start counting from 0)
  */
 CfgEleObj *
 CfgContextGetObjAt(CfgContext * ctx, int index)
@@ -274,8 +274,8 @@ CfgContextGetObjAt(CfgContext * ctx, int
  * CfgContextGetEleAt
  *--------------------------------------------------------------
  * user must typecast the INKCfgEle to appropriate INKEle before using;
- * iterate through the CfgContext, until the count of NON-Comment EleObj's 
- * equals index specified (remember to start counting from 0) 
+ * iterate through the CfgContext, until the count of NON-Comment EleObj's
+ * equals index specified (remember to start counting from 0)
  */
 INKCfgEle *
 CfgContextGetEleAt(CfgContext * ctx, int index)
@@ -327,7 +327,7 @@ CfgContextGetFirst(CfgContext * ctx, INK
   // iterate; return the first CfgEleObj that's not a comment
   curr_ele = ctx->first();      // get head of ele
   while (curr_ele) {
-    if (curr_ele->getRuleType() == INK_TYPE_COMMENT) {  //a comment ele 
+    if (curr_ele->getRuleType() == INK_TYPE_COMMENT) {  //a comment ele
       curr_ele = ctx->next(curr_ele);
       continue;
     } else {
@@ -343,7 +343,7 @@ CfgContextGetFirst(CfgContext * ctx, INK
  * CfgContextGetNext
  *--------------------------------------------------------------
  * Returns pointer to next Non-comment Ele in the CfgContext.
- * Used as part of iterator.  
+ * Used as part of iterator.
  */
 INKCfgEle *
 CfgContextGetNext(CfgContext * ctx, INKCfgIterState * state)
@@ -365,12 +365,12 @@ CfgContextGetNext(CfgContext * ctx, INKC
     }
     curr_ele = ctx->next(curr_ele);     // get next ele
 
-    /*      
-       if (curr_ele->getRuleType() == INK_TYPE_COMMENT) { // a comment ele 
-       continue; 
-       } else { 
+    /*
+       if (curr_ele->getRuleType() == INK_TYPE_COMMENT) { // a comment ele
+       continue;
+       } else {
        *state = curr_ele;
-       return curr_ele->getCfgEle(); 
+       return curr_ele->getCfgEle();
        }
        curr_ele = ctx->next(curr_ele); // get next ele
      */
@@ -436,8 +436,8 @@ CfgContextMoveEleUp(CfgContext * ctx, in
  * CfgContextMoveEleDown
  *--------------------------------------------------------------
  * Locate the EleObj at position index. Remove and delete the EleObj.
- * Make a copy of the ele stored in the EleObj before deleting it and 
- * reinserts the new EleObj in the index+1 position. 
+ * Make a copy of the ele stored in the EleObj before deleting it and
+ * reinserts the new EleObj in the index+1 position.
  */
 INKError
 CfgContextMoveEleDown(CfgContext * ctx, int index)
@@ -492,7 +492,7 @@ CfgContextMoveEleDown(CfgContext * ctx, 
 /*--------------------------------------------------------------
  * CfgContextAppendEle
  *--------------------------------------------------------------
- * Appends the ele to the end of the CfgContext. First must 
+ * Appends the ele to the end of the CfgContext. First must
  * wrap the ele in an CfgEleObj class before can append to CfgContext
  */
 INKError
@@ -509,14 +509,14 @@ CfgContextAppendEle(CfgContext * ctx, IN
 /*--------------------------------------------------------------
  * CfgContextInsertEleAt
  *--------------------------------------------------------------
- * Inserts the ele into specified position of the CfgContext.  First must 
+ * Inserts the ele into specified position of the CfgContext.  First must
  * wrap the ele in an CfgEleObj class before can insert.
- * If there are comments, before the index specified, the 
- * ele will be inserted after the comments. 
- * Note: In the special case of inserting in the first position of the list; 
- * if there are comments before the current non-comment CfgEleObj, 
- * then can just push the new Ele onto the CfgContext. If there are 
- * comments before the first non-comment CfgEleObj, then insert the 
+ * If there are comments, before the index specified, the
+ * ele will be inserted after the comments.
+ * Note: In the special case of inserting in the first position of the list;
+ * if there are comments before the current non-comment CfgEleObj,
+ * then can just push the new Ele onto the CfgContext. If there are
+ * comments before the first non-comment CfgEleObj, then insert the
  * new EleObj right after the last comment
  */
 INKError
@@ -531,7 +531,7 @@ CfgContextInsertEleAt(CfgContext * ctx, 
   ele_obj = create_ele_obj_from_ele(ele);
 
   // iterate through the ctx, keep count of all NON-Comment Ele Objects
-  // when count == index, then insert the new ele object there 
+  // when count == index, then insert the new ele object there
   curr_ele_obj = ctx->first();  // get head of ele
   while (curr_ele_obj) {
     if (curr_ele_obj->getRuleType() == INK_TYPE_COMMENT) {      /* a comment ele */
@@ -568,8 +568,8 @@ CfgContextInsertEleAt(CfgContext * ctx, 
  * CfgContextRemoveEleAt
  *--------------------------------------------------------------
  * Removes the non-comment Ele at the specified index. start couting
- * non-comment ele's from 0, eg. if index = 3, that means remove the 
- * fourth non-comment ELe in the CfgContext 
+ * non-comment ele's from 0, eg. if index = 3, that means remove the
+ * fourth non-comment ELe in the CfgContext
  */
 INKError
 CfgContextRemoveEleAt(CfgContext * ctx, int index)
@@ -578,7 +578,7 @@ CfgContextRemoveEleAt(CfgContext * ctx, 
   int count = 0;
 
   // iterate through the ctx, keep count of all NON-Comment Ele Objects
-  // when count == index, then insert the new ele object there 
+  // when count == index, then insert the new ele object there
   curr_ele_obj = ctx->first();  // get head of ele
   while (curr_ele_obj) {
     if (curr_ele_obj->getRuleType() == INK_TYPE_COMMENT) {      /* a comment ele */

Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextManager.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextManager.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextManager.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextManager.h Thu May 13 07:09:39 2010
@@ -24,11 +24,11 @@
 /*****************************************************************************
  * Filename: CfgContextManager.h (based on FileOp.h)
  * ------------------------------------------------------------------------
- * Purpose: 
+ * Purpose:
  *    Implements some of INKCfgContext functionality in the API; deals only
  *    with the CfgContext class though, not the INKCfgContext; typically
  *    the INKCfgContext function is a wrapper for the function whose purpose
- *    is to make the appropriate typecast to a CfgContext* 
+ *    is to make the appropriate typecast to a CfgContext*
  *
  ***************************************************************************/
 
@@ -44,8 +44,8 @@
  * CfgContext Operations
  ***************************************************************************/
 /* based on file to change, dequeues the add/rm rule, and translates it
- * into CoreAPI terms; because the file name stored , knows the format 
- * of the rules in the queue 
+ * into CoreAPI terms; because the file name stored , knows the format
+ * of the rules in the queue
  */
 CfgContext *CfgContextCreate(INKFileNameT filetype);
 INKError CfgContextDestroy(CfgContext * ctx);

Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextUtils.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextUtils.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextUtils.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextUtils.cc Thu May 13 07:09:39 2010
@@ -33,7 +33,7 @@
  * ---------------------------------------------------------------------------
  * Converts ip address string format to an INKIpAddrEle.
  * Determines if single/range, cidr/not-cidr based on format of string.
- *  
+ *
  * if SINGLE =  ip_a/cidr_a
  * if RANGE =   ip_a/cidr_a-ip_b/cidr_b (possible to have spaces next to dash)
  * Returns NULL if invalid ele (eg. if ip's are invalid)
@@ -61,15 +61,15 @@ string_to_ip_addr_ele(const char *str)
   memset(buf, 0, MAX_BUF_SIZE);
   snprintf(buf, sizeof(buf), "%s", str);
 
-  // determine if range or single type 
+  // determine if range or single type
   range_tokens.Initialize(buf, COPY_TOKS);
   numTokens = range_tokens.getNumber();
-  if (numTokens == 1) {         // SINGLE TYPE 
+  if (numTokens == 1) {         // SINGLE TYPE
     ele->type = INK_IP_SINGLE;
     // determine if cidr type
     cidr_tokens.Initialize(buf, COPY_TOKS);
     numTokens = cidr_tokens.getNumber();
-    if (numTokens == 1) {       // Single, NON-CIDR TYPE 
+    if (numTokens == 1) {       // Single, NON-CIDR TYPE
       ele->ip_a = string_to_ip_addr(str);
     } else {                    // Single, CIDR TYPE
       if (!isNumber(cidr_tokens[1]))
@@ -77,19 +77,19 @@ string_to_ip_addr_ele(const char *str)
       ele->ip_a = string_to_ip_addr(cidr_tokens[0]);
       ele->cidr_a = ink_atoi(cidr_tokens[1]);
     }
-    if (!ele->ip_a)             // ERROR: Invalid ip 
+    if (!ele->ip_a)             // ERROR: Invalid ip
       goto Lerror;
-  } else {                      // RANGE TYPE 
+  } else {                      // RANGE TYPE
     ele->type = INK_IP_RANGE;
     const_ip_a = range_tokens[0];
     const_ip_b = range_tokens[1];
     ip_a = xstrdup(const_ip_a);
     ip_b = xstrdup(const_ip_b);
 
-    // determine if ip's are cidr type; only test if ip_a is cidr, assume both are same 
+    // determine if ip's are cidr type; only test if ip_a is cidr, assume both are same
     cidr_tokens.Initialize(ip_a, COPY_TOKS);
     numTokens = cidr_tokens.getNumber();
-    if (numTokens == 1) {       // Range, NON-CIDR TYPE 
+    if (numTokens == 1) {       // Range, NON-CIDR TYPE
       ele->ip_a = string_to_ip_addr(ip_a);
       ele->ip_b = string_to_ip_addr(ip_b);
     } else {                    // Range, CIDR TYPE */
@@ -147,11 +147,11 @@ ip_addr_ele_to_string(INKIpAddrEle * ele
   if (ele->ip_a == INK_INVALID_IP_ADDR)
     goto Lerror;                // invalid ip_addr
 
-  if (ele->type == INK_IP_SINGLE) {     // SINGLE TYPE 
+  if (ele->type == INK_IP_SINGLE) {     // SINGLE TYPE
     ip_a_str = ip_addr_to_string(ele->ip_a);
-    if (!ip_a_str)              // ERROR: invalid IP address 
+    if (!ip_a_str)              // ERROR: invalid IP address
       goto Lerror;
-    if (ele->cidr_a != INK_INVALID_IP_CIDR) {   // a cidr type  
+    if (ele->cidr_a != INK_INVALID_IP_CIDR) {   // a cidr type
       snprintf(buf, sizeof(buf), "%s%c%d", ip_a_str, CIDR_DELIMITER, ele->cidr_a);
     } else {                    // not cidr type
       snprintf(buf, sizeof(buf), "%s", ip_a_str);
@@ -161,7 +161,7 @@ ip_addr_ele_to_string(INKIpAddrEle * ele
     str = xstrdup(buf);
 
     return str;
-  } else if (ele->type == INK_IP_RANGE) {       // RANGE TYPE 
+  } else if (ele->type == INK_IP_RANGE) {       // RANGE TYPE
     ip_a_str = ip_addr_to_string(ele->ip_a);
     ip_b_str = ip_addr_to_string(ele->ip_b);
 
@@ -169,10 +169,10 @@ ip_addr_ele_to_string(INKIpAddrEle * ele
       goto Lerror;
 
     if (ele->cidr_a != INK_INVALID_IP_CIDR && ele->cidr_b != INK_INVALID_IP_CIDR) {
-      // a cidr type 
+      // a cidr type
       snprintf(buf, sizeof(buf), "%s%c%d%c%s%c%d",
                ip_a_str, CIDR_DELIMITER, ele->cidr_a, RANGE_DELIMITER, ip_b_str, CIDR_DELIMITER, ele->cidr_b);
-    } else {                    // not cidr type 
+    } else {                    // not cidr type
       snprintf(buf, sizeof(buf), "%s%c%s", ip_a_str, RANGE_DELIMITER, ip_b_str);
     }
     if (ip_a_str)
@@ -195,7 +195,7 @@ Lerror:
  * ip_addr_to_string
  * ---------------------------------------------------------------------------
  * Converts an  INKIpAddr (char*) to dotted decimal string notation. Allocates
- * memory for the new INKIpAddr. 
+ * memory for the new INKIpAddr.
  * Returns NULL if invalid INKIpAddr
  */
 char *
@@ -214,7 +214,7 @@ ip_addr_to_string(INKIpAddr ip)
 /* ----------------------------------------------------------------------------
  * string_to_ip_addr
  * ---------------------------------------------------------------------------
- * Converts an ip address in dotted-decimal string format into a string; 
+ * Converts an ip address in dotted-decimal string format into a string;
  * allocates memory for string. If IP is invalid, then returns INK_INVALID_IP_ADDR.
  */
 INKIpAddr
@@ -229,10 +229,10 @@ string_to_ip_addr(const char *str)
   return (INKIpAddr) copy;
 }
 
-/* --------------------------------------------------------------- 
+/* ---------------------------------------------------------------
  * ip_addr_list_to_string
- * --------------------------------------------------------------- 
- * converts INKIpAddrList <==> ip_addr1<delim>ip_addr2<delim>ip_addr3, ... 
+ * ---------------------------------------------------------------
+ * converts INKIpAddrList <==> ip_addr1<delim>ip_addr2<delim>ip_addr3, ...
  * Returns INKIpAddrList with original elements.
  * If encounters invalid INKIpAddrEle, returns NULL.
  */
@@ -274,10 +274,10 @@ ip_addr_list_to_string(IpAddrList * list
   return new_str;
 }
 
-/* --------------------------------------------------------------- 
+/* ---------------------------------------------------------------
  * string_to_ip_addr_list
- * --------------------------------------------------------------- 
- * Converts ip_addr1<delim>ip_addr2<delim>ip_addr3, ...==> INKIpAddrList 
+ * ---------------------------------------------------------------
+ * Converts ip_addr1<delim>ip_addr2<delim>ip_addr3, ...==> INKIpAddrList
  * Does checking to make sure that each ip_addr is valid; if encounter
  * an invalid ip addr, then returns INK_INVALID_LIST
  */
@@ -310,14 +310,14 @@ string_to_ip_addr_list(const char *str_l
   return ip_list;
 }
 
-/* --------------------------------------------------------------- 
+/* ---------------------------------------------------------------
  * port_list_to_string (REPLACE BY sprintf_ports)
- * --------------------------------------------------------------- 
+ * ---------------------------------------------------------------
  * Purpose: prints a list of ports in a PortList into string delimited format
- * Input:  ports - the queue of INKPortEle *'s. 
+ * Input:  ports - the queue of INKPortEle *'s.
  * Output: port_0<delim>port_1<delim>...<delim>port_n
  *         (each port can refer to a port range, eg 80-90)
- *         Return NULL if encounter invalid port or empty port list 
+ *         Return NULL if encounter invalid port or empty port list
  */
 char *
 port_list_to_string(PortList * ports, const char *delimiter)
@@ -337,19 +337,19 @@ port_list_to_string(PortList * ports, co
   if (num_ports <= 0) {         // no ports specified
     goto Lerror;
   }
-  // now list all the ports, including ranges 
+  // now list all the ports, including ranges
   for (i = 0; i < num_ports; i++) {
     port_ele = (INKPortEle *) dequeue((LLQ *) ports);
     if (!ccu_checkPortEle(port_ele)) {
-      enqueue((LLQ *) ports, port_ele); // return INKPortEle to list 
+      enqueue((LLQ *) ports, port_ele); // return INKPortEle to list
       goto Lerror;
     }
 
     if (pos < sizeof(buf) && (psize = snprintf(buf + pos, sizeof(buf) - pos, "%d", port_ele->port_a)) > 0) {
       pos += psize;
     }
-    if (port_ele->port_b != INK_INVALID_PORT) { //. is this a range 
-      // add in range delimiter & end of range 
+    if (port_ele->port_b != INK_INVALID_PORT) { //. is this a range
+      // add in range delimiter & end of range
       if (pos < sizeof(buf) &&
           (psize = snprintf(buf + pos, sizeof(buf) - pos, "%c%d", RANGE_DELIMITER, port_ele->port_b)) > 0)
         pos += psize;
@@ -360,7 +360,7 @@ port_list_to_string(PortList * ports, co
         pos += psize;
     }
 
-    enqueue((LLQ *) ports, port_ele);   // return INKPortEle to list 
+    enqueue((LLQ *) ports, port_ele);   // return INKPortEle to list
   }
 
   str = xstrdup(buf);
@@ -370,10 +370,10 @@ Lerror:
   return NULL;
 }
 
-/* --------------------------------------------------------------- 
+/* ---------------------------------------------------------------
  * string_to_port_list
- * --------------------------------------------------------------- 
- * Converts port1<delim>port2<delim>port3, ...==> INKPortList 
+ * ---------------------------------------------------------------
+ * Converts port1<delim>port2<delim>port3, ...==> INKPortList
  * Does checking to make sure that each ip_addr is valid; if encounter
  * an invalid ip addr, then returns INKT_INVALID_LIST
  */
@@ -426,7 +426,7 @@ port_ele_to_string(INKPortEle * ele)
 
   memset(buf, 0, MAX_BUF_SIZE);
 
-  if (ele->port_b == INK_INVALID_PORT) {        // Not a range 
+  if (ele->port_b == INK_INVALID_PORT) {        // Not a range
     snprintf(buf, sizeof(buf), "%d", ele->port_a);
   } else {
     snprintf(buf, sizeof(buf), "%d%c%d", ele->port_a, RANGE_DELIMITER, ele->port_b);
@@ -439,8 +439,8 @@ port_ele_to_string(INKPortEle * ele)
 /*----------------------------------------------------------------------------
  * string_to_port_ele
  *---------------------------------------------------------------------------
- * Converts a string formatted port_ele into actual port_ele. Returns NULL if 
- * invalid port(s). It is okay to have a single port specified. 
+ * Converts a string formatted port_ele into actual port_ele. Returns NULL if
+ * invalid port(s). It is okay to have a single port specified.
  */
 INKPortEle *
 string_to_port_ele(const char *str)
@@ -484,8 +484,8 @@ Lerror:
 /*----------------------------------------------------------------------------
  * string_list_to_string
  *----------------------------------------------------------------------------
- * Converts str list to delimited string. Does not alter the 
- * StringList passed in. 
+ * Converts str list to delimited string. Does not alter the
+ * StringList passed in.
  * eg. str1<delim>str2<delim>str3...
  */
 char *
@@ -505,7 +505,7 @@ string_list_to_string(INKStringList str_
   for (i = 0; i < numElems; i++) {
     str_ele = (char *) dequeue((LLQ *) str_list);
 
-    if (i == numElems - 1) {    // the last element shouldn't print comma 
+    if (i == numElems - 1) {    // the last element shouldn't print comma
       if (buf_pos<sizeof(buf) && (psize = snprintf(buf + buf_pos, sizeof(buf) - buf_pos, "%s", str_ele))> 0)
         buf_pos += psize;
     } else {
@@ -521,10 +521,10 @@ string_list_to_string(INKStringList str_
   return list_str;
 }
 
-/* --------------------------------------------------------------- 
+/* ---------------------------------------------------------------
  * string_to_string_list
- * --------------------------------------------------------------- 
- * Converts port1<delim>port2<delim>port3, ...==> INKStringList 
+ * ---------------------------------------------------------------
+ * Converts port1<delim>port2<delim>port3, ...==> INKStringList
  * Does checking to make sure that each ip_addr is valid; if encounter
  * an invalid ip addr, then returns INVALID_HANDLE
  */
@@ -585,10 +585,10 @@ int_list_to_string(INKIntList list, cons
   return xstrdup(buf);
 }
 
-/* --------------------------------------------------------------- 
+/* ---------------------------------------------------------------
  * string_to_int_list
- * --------------------------------------------------------------- 
- * converts domain1<delim>domain2<delim>domain3, ... ==> INKList 
+ * ---------------------------------------------------------------
+ * converts domain1<delim>domain2<delim>domain3, ... ==> INKList
  * Does checking to make sure that each integer is valid; if encounter
  * an invalid int, then returns INK_INVALID_LIST
  */
@@ -627,11 +627,11 @@ Lerror:
 }
 
 
-/* --------------------------------------------------------------- 
+/* ---------------------------------------------------------------
  * string_to_domain_list
- * --------------------------------------------------------------- 
- * Converts domain1<delim>domain2<delim>domain3, ... ==> INKDomainList 
- * Returns INK_INVALID_LIST if encounter an invalid Domain. 
+ * ---------------------------------------------------------------
+ * Converts domain1<delim>domain2<delim>domain3, ... ==> INKDomainList
+ * Returns INK_INVALID_LIST if encounter an invalid Domain.
  */
 INKDomainList
 string_to_domain_list(const char *str_list, const char *delimiter)
@@ -671,7 +671,7 @@ string_to_domain_list(const char *str_li
  * INKList(of char*'s only)==> elem1<delimiter>elem2<delimiter>elem3<delimiter>
  * Note: the string always ends with the delimiter
  * The list and its elements are not changed in any way.
- * Returns NULL if encounter an invalid INKDomain. 
+ * Returns NULL if encounter an invalid INKDomain.
  */
 char *
 domain_list_to_string(INKDomainList list, const char *delimiter)
@@ -697,7 +697,7 @@ domain_list_to_string(INKDomainList list
     if (!dom_str) {
       return NULL;
     }
-    if (i == numElems - 1) {    // the last element shouldn't print comma 
+    if (i == numElems - 1) {    // the last element shouldn't print comma
       if (buf_pos<sizeof(buf) && (psize = snprintf(buf + buf_pos, sizeof(buf) - buf_pos, "%s", dom_str))> 0)
         buf_pos += psize;
     } else {
@@ -718,7 +718,7 @@ domain_list_to_string(INKDomainList list
  * domain_to_string
  *----------------------------------------------------------------------------
  * Converts an INKDomain into string format, eg. www.host.com:8080
- * Return NULL if invalid INKDomain (eg. missing domain value). 
+ * Return NULL if invalid INKDomain (eg. missing domain value).
  */
 char *
 domain_to_string(INKDomain * domain)
@@ -731,12 +731,12 @@ domain_to_string(INKDomain * domain)
     return NULL;
 
   if (domain->domain_val) {
-    if (domain->port != INK_INVALID_PORT)       // host:port 
+    if (domain->port != INK_INVALID_PORT)       // host:port
       snprintf(buf, sizeof(buf), "%s:%d", domain->domain_val, domain->port);
     else                        // host
       snprintf(buf, sizeof(buf), "%s", domain->domain_val);
   } else {
-    return NULL;                // invalid INKDomain 
+    return NULL;                // invalid INKDomain
   }
 
   dom_str = xstrdup(buf);
@@ -749,8 +749,8 @@ domain_to_string(INKDomain * domain)
  *----------------------------------------------------------------------------
  * Converts string format, eg. www.host.com:8080, into INKDomain.
  * The string can consist of just the host (which can be a name or an IP)
- * or of the host and port. 
- * Return NULL if invalid INKDomain (eg. missing domain value). 
+ * or of the host and port.
+ * Return NULL if invalid INKDomain (eg. missing domain value).
  */
 INKDomain *
 string_to_domain(const char *str)
@@ -776,7 +776,7 @@ string_to_domain(const char *str)
 
   // get port, if exists
   if (remain) {
-    // check if the "remain" consist of all integers 
+    // check if the "remain" consist of all integers
     if (!isNumber(remain))
       goto Lerror;
     dom->port = ink_atoi(remain);
@@ -793,11 +793,11 @@ Lerror:
 
 /* ---------------------------------------------------------------
  * pdest_sspec_to_string
- * --------------------------------------------------------------- 
- * Converts the INKPrimeDest, primary dest, secondary spec struct 
+ * ---------------------------------------------------------------
+ * Converts the INKPrimeDest, primary dest, secondary spec struct
  * into string format: <pdT>:pdst_val:sspec1:sspec2:...:
  * <pdT> - dest_domain, dest_host, dest_ip, url_regex
- * even if sspec is missing the delimter is included; so if no 
+ * even if sspec is missing the delimter is included; so if no
  * sspecs, then : ::: ::: will appear
  */
 char *
@@ -843,7 +843,7 @@ pdest_sspec_to_string(INKPrimeDestT pd, 
 
     // if there are secondary specifiers
     if (sspec) {
-      // convert the time into a string, eg. 8 to "08" 
+      // convert the time into a string, eg. 8 to "08"
       if (sspec->time.hour_a == 0) {
         snprintf(hour_a, sizeof(hour_a), "00");
       } else {
@@ -1005,7 +1005,7 @@ pdest_sspec_to_string(INKPrimeDestT pd, 
 /*----------------------------------------------------------------------------
  * string_to_pdss_format
  *----------------------------------------------------------------------------
- * <pd_type>#<pd_value>#<sspecs> --> INKPdSsFormat 
+ * <pd_type>#<pd_value>#<sspecs> --> INKPdSsFormat
  * NOTE that the entire data line, including the action type is being passed in
  */
 INKError
@@ -1024,7 +1024,7 @@ string_to_pdss_format(const char *str, I
 
   tokens.Initialize(copy, ALLOW_EMPTY_TOKS);
 
-  // pd type 
+  // pd type
   if (strcmp(tokens[1], "dest_domain") == 0) {
     pdss->pd_type = INK_PD_DOMAIN;
   } else if (strcmp(tokens[1], "dest_host") == 0) {
@@ -1037,42 +1037,42 @@ string_to_pdss_format(const char *str, I
     goto Lerror;
   }
 
-  // pd_value 
+  // pd_value
   if (!tokens[2])
     goto Lerror;
   pdss->pd_val = xstrdup(tokens[2]);
 
-  // check secondary specifiers; exists only if not empty string 
+  // check secondary specifiers; exists only if not empty string
   // time
   if (strlen(tokens[3]) > 0) {
     if (string_to_time_struct(tokens[3], &(pdss->sec_spec)) != INK_ERR_OKAY)
       goto Lerror;
   }
-  // src_ip 
+  // src_ip
   if (strlen(tokens[4]) > 0) {
     pdss->sec_spec.src_ip = xstrdup(tokens[4]);
   }
-  // prefix 
+  // prefix
   if (strlen(tokens[5]) > 0) {
     pdss->sec_spec.prefix = xstrdup(tokens[5]);
   }
-  // suffix 
+  // suffix
   if (strlen(tokens[6]) > 0) {
     pdss->sec_spec.suffix = xstrdup(tokens[6]);
   }
-  // port 
-  if (strlen(tokens[7]) > 0) {  // no port 
+  // port
+  if (strlen(tokens[7]) > 0) {  // no port
     pdss->sec_spec.port = string_to_port_ele(tokens[7]);
   }
   // method
   if (strlen(tokens[8]) > 0) {
     pdss->sec_spec.method = string_to_method_type(tokens[8]);
   }
-  // scheme 
+  // scheme
   if (strlen(tokens[9]) > 0) {
     pdss->sec_spec.scheme = string_to_scheme_type(tokens[9]);
   }
-  // mixt tag 
+  // mixt tag
   if (strlen(tokens[10]) > 0) {
     pdss->sec_spec.mixt = string_to_mixt_type(tokens[10]);
   }
@@ -1119,8 +1119,8 @@ hms_time_to_string(INKHmsTime time)
 /*----------------------------------------------------------------------------
  * string_to_hms_time
  *----------------------------------------------------------------------------
- * Convert ?d?h?m?s ==> INKHmsTime 
- * Returns INK_ERR_FAIL if invalid hms format, eg. if there are invalid 
+ * Convert ?d?h?m?s ==> INKHmsTime
+ * Returns INK_ERR_FAIL if invalid hms format, eg. if there are invalid
  * characters, eg. "10xh", "10h15m30s34", or repeated values, eg. "10h15h"
  */
 INKError
@@ -1188,13 +1188,13 @@ Lerror:
  * string_to_time_struct
  *----------------------------------------------------------------------------
  * convert string "09:00-23:00" to time struct
- *  struct {                    
- *   int hour_a; 
- *   int min_a;  
- *   int hour_b; 
- *   int min_b;   
- *  } time 
- * Returns INK_ERR_FAIL if invalid time string. 
+ *  struct {
+ *   int hour_a;
+ *   int min_a;
+ *   int hour_b;
+ *   int min_b;
+ *  } time
+ * Returns INK_ERR_FAIL if invalid time string.
  */
 INKError
 string_to_time_struct(const char *str, INKSspec * sspec)
@@ -1234,7 +1234,7 @@ string_to_time_struct(const char *str, I
     sspec->time.min_b = ink_atoi(time_tokens[3]);
   }
 
-  // check valid time values 
+  // check valid time values
   if (!ccu_checkTimePeriod(sspec))
     goto Lerror;
 
@@ -1248,7 +1248,7 @@ Lerror:
 /*----------------------------------------------------------------------------
  * string_to_header_type
  *----------------------------------------------------------------------------
- * string ==> INKHdrT 
+ * string ==> INKHdrT
  */
 INKHdrT
 string_to_header_type(const char *str)
@@ -1347,7 +1347,7 @@ string_to_method_type(const char *method
     return INK_METHOD_PUT;
   } else if (strcasecmp(method, "trace") == 0) {
     return INK_METHOD_TRACE;
-  } else if (strcasecmp(method, "push") == 0) { // could be "push" or "PUSH" 
+  } else if (strcasecmp(method, "push") == 0) { // could be "push" or "PUSH"
     return INK_METHOD_PUSH;
   }
 
@@ -1461,7 +1461,7 @@ multicast_type_to_string(INKMcTtlT mc)
   return NULL;
 }
 
-/* ------------------------------------------------------------------------- 
+/* -------------------------------------------------------------------------
  * string_to_round_robin_type
  * -------------------------------------------------------------------------
  */
@@ -1565,7 +1565,7 @@ filename_to_string(INKFileNameT file)
   }
 }
 
-/* ------------------------------------------------------------------------- 
+/* -------------------------------------------------------------------------
  * string_to_congest_scheme_type
  * -------------------------------------------------------------------------
  */
@@ -1581,7 +1581,7 @@ string_to_congest_scheme_type(const char
   return INK_HTTP_CONGEST_UNDEFINED;
 }
 
-/* ------------------------------------------------------------------------- 
+/* -------------------------------------------------------------------------
  * string_to_admin_acc_type
  * -------------------------------------------------------------------------
  */
@@ -1624,16 +1624,16 @@ admin_acc_type_to_string(INKAccessT acce
 /***************************************************************************
  * Tokens-to-Struct Converstion Functions
  ***************************************************************************/
-/* ------------------------------------------------------------------------- 
+/* -------------------------------------------------------------------------
  * tokens_to_pdss_format
- * ------------------------------------------------------------------------- 
+ * -------------------------------------------------------------------------
  * Pass in the TokenList and a pointer to first Token to start iterating from.
  * Iterates through the tokens, checking
- * for tokens that are either primary destination specifiers and secondary 
+ * for tokens that are either primary destination specifiers and secondary
  * specfiers. Returns pointer to the last valid pointer; eg. the last sec
- * spec that was in the list. If there are no primary dest or sec specs, 
- * then just returns same pointer originally passed in. 
- * 
+ * spec that was in the list. If there are no primary dest or sec specs,
+ * then just returns same pointer originally passed in.
+ *
  * Returns NULL, if the first token IS NOT a  Primary Dest Specifier
  */
 Token *
@@ -1727,9 +1727,9 @@ tokens_to_pdss_format(TokenList * tokens
  * Validation Functions
  ***************************************************************************/
 
-/* ------------------------------------------------------------------------- 
+/* -------------------------------------------------------------------------
  * isNumber
- * ------------------------------------------------------------------------- 
+ * -------------------------------------------------------------------------
  * Returns true if the entire string is numerical
  */
 bool
@@ -1744,12 +1744,12 @@ isNumber(const char *strNum)
   return true;
 }
 
-/* ------------------------------------------------------------------------- 
+/* -------------------------------------------------------------------------
  * ccu_checkIpAddr (from WebFileEdit.cc)
- * ------------------------------------------------------------------------- 
+ * -------------------------------------------------------------------------
  *   Checks to see if the passed in string represents a valid
  *     ip address in dot notation (ie 209.1.33.20)
- *   If the min_addr and max_addr are specified, then it checks 
+ *   If the min_addr and max_addr are specified, then it checks
  *   that the ip address falls within the range; Otherwise
  *   the min_addr = 0.0.0.0 and max_addr = 255.255.255.255
  *
@@ -1766,7 +1766,7 @@ ccu_checkIpAddr(const char *addr, const 
   if (!addr || !min_addr || !max_addr)
     return false;
   // BZ47440
-  // truncate any leading or trailing white spaces from addr, 
+  // truncate any leading or trailing white spaces from addr,
   // which can occur if IP is from a list of IP addresses
   char *new_addr = chopWhiteSpaces_alloc((char *) addr);
   if (new_addr == NULL)
@@ -1819,9 +1819,9 @@ ccu_checkIpAddrEle(INKIpAddrEle * ele)
   if (!ele || ele->ip_a == INK_INVALID_IP_ADDR)
     return false;
 
-  if (ele->type == INK_IP_SINGLE) {     // SINGLE TYPE 
+  if (ele->type == INK_IP_SINGLE) {     // SINGLE TYPE
     return (ccu_checkIpAddr(ele->ip_a));
-  } else if (ele->type == INK_IP_RANGE) {       // RANGE TYPE 
+  } else if (ele->type == INK_IP_RANGE) {       // RANGE TYPE
     return (ccu_checkIpAddr(ele->ip_a) && ccu_checkIpAddr(ele->ip_b));
   } else {
     return false;
@@ -1851,9 +1851,9 @@ ccu_checkPortEle(INKPortEle * ele)
   }
 }
 
-/* --------------------------------------------------------------- 
- * checkPdSspec 
- * --------------------------------------------------------------- 
+/* ---------------------------------------------------------------
+ * checkPdSspec
+ * ---------------------------------------------------------------
  * must have a prim dest value spsecified and have valid prim dest type
  */
 bool
@@ -1900,10 +1900,10 @@ Lerror:
   return false;
 }
 
-/* --------------------------------------------------------------- 
+/* ---------------------------------------------------------------
  * ccu_checkUrl
- * --------------------------------------------------------------- 
- * Checks that there is not more than one instance of  ":/" in 
+ * ---------------------------------------------------------------
+ * Checks that there is not more than one instance of  ":/" in
  * the url.
  */
 bool
@@ -1912,7 +1912,7 @@ ccu_checkUrl(char *url)
   // Chop the protocol part, if it exists
   char *slashStr = strstr(url, "://");
   if (!slashStr) {
-    return false;               // missing protocol 
+    return false;               // missing protocol
   } else {
     url = slashStr + 3;         // advance two positions to get rid of leading '://'
   }
@@ -1934,17 +1934,17 @@ ccu_checkUrl(char *url)
   return true;
 }
 
-/* --------------------------------------------------------------- 
+/* ---------------------------------------------------------------
  * ccu_checkTimePeriod
- * --------------------------------------------------------------- 
- * Checks that the time struct used to specify the time period in the 
- * INKSspec has valid time values (eg. 0-23 hr, 0-59 min) and that 
+ * ---------------------------------------------------------------
+ * Checks that the time struct used to specify the time period in the
+ * INKSspec has valid time values (eg. 0-23 hr, 0-59 min) and that
  * time A <= time B
  */
 bool
 ccu_checkTimePeriod(INKSspec * sspec)
 {
-  // check valid time values 
+  // check valid time values
   if (sspec->time.hour_a < 0 || sspec->time.hour_a > 23 ||
       sspec->time.hour_b < 0 || sspec->time.hour_b > 23 ||
       sspec->time.min_a < 0 || sspec->time.min_a > 59 || sspec->time.min_b < 0 || sspec->time.min_b > 59)
@@ -1964,7 +1964,7 @@ ccu_checkTimePeriod(INKSspec * sspec)
 /* ----------------------------------------------------------------------------
  * chopWhiteSpaces_alloc
  * ---------------------------------------------------------------------------
- * eliminates any leading and trailing white spaces from str; returns 
+ * eliminates any leading and trailing white spaces from str; returns
  * the new allocated string
  */
 char *
@@ -2001,7 +2001,7 @@ chopWhiteSpaces_alloc(char *str)
  * create_ele_obj_from_rule_node
  *--------------------------------------------------------------
  * Calls the appropriate subclasses' constructor using TokenList.
- * Returns NULL if invalid Ele. 
+ * Returns NULL if invalid Ele.
  */
 CfgEleObj *
 create_ele_obj_from_rule_node(Rule * rule)
@@ -2174,7 +2174,7 @@ create_ele_obj_from_ele(INKCfgEle * ele)
   case INK_LOG_FILTER:         /* logs_xml.config */
   case INK_LOG_OBJECT:         // fall-through
   case INK_LOG_FORMAT:         // fall-through
-    //ele_obj = (CfgEleObj*) new LogFilterObj((INKLogFilterEle*)ele); 
+    //ele_obj = (CfgEleObj*) new LogFilterObj((INKLogFilterEle*)ele);
     break;
 
   case INK_MGMT_ALLOW:         /* mgmt_allow.config */
@@ -2390,11 +2390,11 @@ get_rule_type(TokenList * token_list, IN
 
 ///////////////////////////////////////////////////////////////////
 // Since we are using the ele's as C structures wrapped in C++ classes
-// we need to write copy function that "copy" the C structures 
-// 1) need copy functions for each helper information struct which 
+// we need to write copy function that "copy" the C structures
+// 1) need copy functions for each helper information struct which
 //    are typically embedded in the Ele's (eg. any lists, INKSspec)
 // 2) need copy functions for each Ele; these functiosn will actually
-// be called by teh copy constructors and overloaded assignment 
+// be called by teh copy constructors and overloaded assignment
 // operators in each CfgEleObj subclass!!
 ///////////////////////////////////////////////////////////////////
 void

Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextUtils.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextUtils.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextUtils.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextUtils.h Thu May 13 07:09:39 2010
@@ -24,11 +24,11 @@
 /*****************************************************************************
  * Filename: CfgContextUtils.h (based on FileOp.h)
  * ------------------------------------------------------------------------
- * Purpose: 
- * 1) Contains helper functions to convert "values" from TokenList to Ele 
+ * Purpose:
+ * 1) Contains helper functions to convert "values" from TokenList to Ele
  * format and from Ele Format to file Rule Format
  * 2) contains helper functions to check for valid info
- * 
+ *
  ***************************************************************************/
 
 #ifndef _CONTEXT_UTILS_H_
@@ -55,7 +55,7 @@ INKIpAddr string_to_ip_addr(const char *
 char *ip_addr_list_to_string(IpAddrList * list, const char *delimiter);
 INKIpAddrList string_to_ip_addr_list(const char *str_list, const char *delimiter);
 
-/* PortList <==> port_1<delim>port_2<delim>port_3<delim>...<delim>port_n 
+/* PortList <==> port_1<delim>port_2<delim>port_3<delim>...<delim>port_n
  * (Note: each port can be a port range */
 char *port_list_to_string(PortList * ports, const char *delimiter);
 INKPortList string_to_port_list(const char *str_list, const char *delimiter);