trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bc...@apache.org
Subject svn commit: r938607 [4/5] - in /incubator/trafficserver/traffic/trunk: ./ iocore/cache/ iocore/cluster/ iocore/dns/ iocore/eventsystem/ iocore/hostdb/ iocore/net/ libinktomi++/ librecords/ proxy/ proxy/api/include/ proxy/congest/ proxy/hdrs/ proxy/http...
Date Tue, 27 Apr 2010 19:12:27 GMT
Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/INKMgmtAPI.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/INKMgmtAPI.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/INKMgmtAPI.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/INKMgmtAPI.cc Tue Apr 27 19:12:22 2010
@@ -2007,7 +2007,7 @@ INKRecordGet(char *rec_name, INKRecordEl
 }
 
 INKError
-INKRecordGetInt(char *rec_name, INKInt * int_val)
+INKRecordGetInt(const char *rec_name, INKInt * int_val)
 {
   INKError ret = INK_ERR_OKAY;
 
@@ -2024,7 +2024,7 @@ END:
 }
 
 INKError
-INKRecordGetCounter(char *rec_name, INKCounter * counter_val)
+INKRecordGetCounter(const char *rec_name, INKCounter * counter_val)
 {
   INKError ret;
 
@@ -2040,7 +2040,7 @@ END:
 }
 
 INKError
-INKRecordGetFloat(char *rec_name, INKFloat * float_val)
+INKRecordGetFloat(const char *rec_name, INKFloat * float_val)
 {
   INKError ret;
 
@@ -2056,7 +2056,7 @@ END:
 }
 
 INKError
-INKRecordGetString(char *rec_name, INKString * string_val)
+INKRecordGetString(const char *rec_name, INKString *string_val)
 {
   INKError ret;
   char *str;
@@ -2138,32 +2138,32 @@ INKRecordGetMlt(INKStringList rec_names,
 
 
 inkapi INKError
-INKRecordSet(char *rec_name, INKString val, INKActionNeedT * action_need)
+INKRecordSet(const char *rec_name, const char *val, INKActionNeedT * action_need)
 {
   return MgmtRecordSet(rec_name, val, action_need);
 }
 
 
 inkapi INKError
-INKRecordSetInt(char *rec_name, INKInt int_val, INKActionNeedT * action_need)
+INKRecordSetInt(const char *rec_name, INKInt int_val, INKActionNeedT * action_need)
 {
   return MgmtRecordSetInt(rec_name, int_val, action_need);
 }
 
 inkapi INKError
-INKRecordSetCounter(char *rec_name, INKCounter counter_val, INKActionNeedT * action_need)
+INKRecordSetCounter(const char *rec_name, INKCounter counter_val, INKActionNeedT * action_need)
 {
   return MgmtRecordSetCounter(rec_name, counter_val, action_need);
 }
 
 inkapi INKError
-INKRecordSetFloat(char *rec_name, INKFloat float_val, INKActionNeedT * action_need)
+INKRecordSetFloat(const char *rec_name, INKFloat float_val, INKActionNeedT * action_need)
 {
   return MgmtRecordSetFloat(rec_name, float_val, action_need);
 }
 
 inkapi INKError
-INKRecordSetString(char *rec_name, INKString str_val, INKActionNeedT * action_need)
+INKRecordSetString(const char *rec_name, const char *str_val, INKActionNeedT * action_need)
 {
   return MgmtRecordSetString(rec_name, str_val, action_need);
 }
@@ -2238,7 +2238,7 @@ INKRecordSetMlt(INKList rec_list, INKAct
 
 /*--- api initialization and shutdown -------------------------------------*/
 inkapi INKError
-INKInit(char *socket_path)
+INKInit(const char *socket_path)
 {
   return Init(socket_path);
 }
@@ -2468,7 +2468,7 @@ INKEncryptPassword(char *passwd, char **
 }
 
 inkapi INKError
-INKEncryptToFile(char *passwd, char *filepath)
+INKEncryptToFile(const char *passwd, const char *filepath)
 {
   return EncryptToFile(passwd, filepath);
 }
@@ -2513,7 +2513,7 @@ INKReadFromUrl(char *url, char **header,
 }
 
 inkapi INKError
-INKReadFromUrlEx(char *url, char **header, int *headerSize, char **body, int *bodySize, int timeout)
+INKReadFromUrlEx(const char *url, char **header, int *headerSize, char **body, int *bodySize, int timeout)
 {
   int hFD = -1;
   char *httpHost = NULL;
@@ -2533,12 +2533,12 @@ INKReadFromUrlEx(char *url, char **heade
     timeout = URL_TIMEOUT;
   }
   // Chop the protocol part, if it exists
-  char *doubleSlash = strstr(url, "//");
+  const char *doubleSlash = strstr(url, "//");
   if (doubleSlash) {
     url = doubleSlash + 2;      // advance two positions to get rid of leading '//'
   }
   // the path starts after the first occurrence of '/'
-  char *tempPath = strstr(url, "/");
+  const char *tempPath = strstr(url, "/");
   char *host_and_port;
   if (tempPath) {
     host_and_port = xstrndup(url, strlen(url) - strlen(tempPath));
@@ -2966,7 +2966,7 @@ INKIsValid(INKCfgEle * ele)
 /* Process forking function for ftp.tcl helper */
 
 static int
-ftpProcessSpawn(char *args[], char *output)
+ftpProcessSpawn(const char *args[], char *output)
 {
   int status = 0;
 
@@ -2986,7 +2986,7 @@ ftpProcessSpawn(char *args[], char *outp
     dup2(stdoutPipe[1], STDOUT_FILENO);
     close(stdoutPipe[0]);
 
-    pid = execv(args[0], &args[0]);
+    pid = execv(args[0], (char* const*)&args[0]);
     if (pid == -1) {
       fprintf(stderr, "[ftpProcessSpawn] unable to execv [%s,%s...]\n", args[0], args[1]);
     }
@@ -3076,7 +3076,7 @@ tclCheckProcessSpawn(char *args[], char 
 /* Snapshot Interface-centric function */
 
 inkapi INKError
-INKMgmtFtp(char *ftpCmd, char *ftp_server_name, char *ftp_login, char *ftp_password, char *local, char *remote,
+INKMgmtFtp(const char *ftpCmd, const char *ftp_server_name, const char *ftp_login, const char *ftp_password, const char *local, const char *remote,
            char *output)
 {
   char script_path[1024];
@@ -3098,7 +3098,7 @@ INKMgmtFtp(char *ftpCmd, char *ftp_serve
     if (chk_status == 0) {
       /* Go ahead and try the using the FTP .tcl script */
       snprintf(script_path, sizeof(script_path), "%s/configure/helper/INKMgmtAPIFtp.tcl", ui_path);
-      char *args[] = {
+      const char *args[] = {
         script_path,
         ftpCmd,
         ftp_server_name,
@@ -3596,7 +3596,7 @@ inkapi INKError rm_start_proxy()
 
   if (time_diff > 60 || time_diff < 0) {        // wrap around??  shall never happen 
     pid_t pid;
-    char *argv[3];
+    const char *argv[3];
     argv[0] = "net_config";
     argv[1] = "7";
     argv[2] = NULL;
@@ -3619,7 +3619,7 @@ inkapi INKError rm_start_proxy()
       close(1);                 // close STDOUT
       close(2);                 // close STDERR
 
-      int res = execv(command_path, argv);
+      int res = execv(command_path, (char* const*)argv);
       if (res != 0) {
         perror("[rm_start_proxy] net_config stop_proxy failed! ");
       }
@@ -3910,7 +3910,7 @@ INKSetNICDown(INKString nic_name, INKStr
 
 
 inkapi INKError
-INKSetSearchDomain(INKString search_name)
+INKSetSearchDomain(const char *search_name)
 {
   //Nothing to be done for now
   return INK_ERR_OKAY;

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/INKMgmtAPIStub.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/INKMgmtAPIStub.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/INKMgmtAPIStub.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/INKMgmtAPIStub.cc Tue Apr 27 19:12:22 2010
@@ -740,7 +740,7 @@ INKRecordSetFloat(char *rec_name, INKFlo
 }
 
 inkapi INKError
-INKRecordSetString(char *rec_name, INKString str_val, INKActionNeedT * action_nee)
+INKRecordSetString(const char *rec_name, const char *str_val, INKActionNeedT * action_nee)
 {
   return INK_ERR_OKAY;
 }

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/MgmtPlugin.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/MgmtPlugin.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/MgmtPlugin.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/MgmtPlugin.cc Tue Apr 27 19:12:22 2010
@@ -55,8 +55,8 @@
 #define MAX_BUF_SIZE 1024
 #endif
 
-static char *plugin_dir = ".";
-static char *config_dir = "../etc/trafficserver";
+static const char *plugin_dir = ".";
+static const char *config_dir = "../etc/trafficserver";
 
 typedef void (*init_func_t) (int argc, char *argv[]);
 typedef void (*init_func_w_handle_t) (void *handle, int argc, char *argv[]);
@@ -93,7 +93,7 @@ dll_open(char *fn)
 // dll_findsym (copied from Plugin.cc)
 //
 static void *
-dll_findsym(void *dlp, char *name)
+dll_findsym(void *dlp, const char *name)
 {
   return (void *) dlsym(dlp, name);
 }

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/include/INKMgmtAPI.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/include/INKMgmtAPI.h?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/include/INKMgmtAPI.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/include/INKMgmtAPI.h Tue Apr 27 19:12:22 2010
@@ -1213,7 +1213,7 @@ typedef enum
  *       even if not successful connection (eg. client program is started
  *       before TM) then can still make API calls and will try connecting then
  */
-  inkapi INKError INKInit(char *socket_path);
+  inkapi INKError INKInit(const char *socket_path);
 
 /* INKTerminate: does clean up for API clients
  * Input: <none>
@@ -1317,7 +1317,7 @@ typedef enum
  * Output: INKError  
  * Note: Uses certificate in ACL module for encryption. 
  */
-  inkapi INKError INKEncryptToFile(char *passwd, char *filepath);
+  inkapi INKError INKEncryptToFile(const char *passwd, const char *filepath);
 
 /*--- direct file operations ----------------------------------------------*/
 /* INKConfigFileRead: reads a config file into a buffer
@@ -1375,7 +1375,7 @@ typedef enum
  *       - www.inktomi.com
  * NOTE: header and headerSize can be NULL
  */
-  inkapi INKError INKReadFromUrlEx(char *url, char **header, int *headerSize, char **body, int *bodySize, int timeout);
+  inkapi INKError INKReadFromUrlEx(const char *url, char **header, int *headerSize, char **body, int *bodySize, int timeout);
 
 /*--- snapshot operations -------------------------------------------------*/
 /* INKSnapshotTake: takes snapshot of configuration at that instant in time
@@ -1416,8 +1416,8 @@ typedef enum
  * Output: INKError
  */
 //inkapi INKError INKMgmtFtpPut(const char* ftp_server_name, const char* ftp_login, const char* ftp_password, const char* localDir, const char *remoteDir);
-  inkapi INKError INKMgmtFtp(char *ftpCmd, char *ftp_server_name, char *ftp_login, char *ftp_password, char *local,
-                             char *remote, char *output);
+  inkapi INKError INKMgmtFtp(const char *ftpCmd, const char *ftp_server_name, const char *ftp_login, const char *ftp_password, const char *local,
+                             const char *remote, char *output);
 /*--- statistics operations -----------------------------------------------*/
 /* INKStatsReset: sets all the statistics variables to their default values
  * Input: <none>
@@ -1440,10 +1440,10 @@ typedef enum
  * Note: For INKRecordGetString, the function will allocate memory for the 
  *       *string_val, so the caller must free (*string_val);
  */
-  inkapi INKError INKRecordGetInt(char *rec_name, INKInt * int_val);
-  inkapi INKError INKRecordGetCounter(char *rec_name, INKCounter * counter_val);
-  inkapi INKError INKRecordGetFloat(char *rec_name, INKFloat * float_val);
-  inkapi INKError INKRecordGetString(char *rec_name, INKString * string_val);
+  inkapi INKError INKRecordGetInt(const char *rec_name, INKInt * int_val);
+  inkapi INKError INKRecordGetCounter(const char *rec_name, INKCounter * counter_val);
+  inkapi INKError INKRecordGetFloat(const char *rec_name, INKFloat * float_val);
+  inkapi INKError INKRecordGetString(const char *rec_name, INKString * string_val);
 
 /* INKRecordGetMlt: gets a set of records
  * Input:  rec_list - list of record names the user wants to retrieve; 
@@ -1460,11 +1460,11 @@ typedef enum
  * Output: INKError
  */
 
-  inkapi INKError INKRecordSet(char *rec_name, INKString val, INKActionNeedT * action_need);
-  inkapi INKError INKRecordSetInt(char *rec_name, INKInt int_val, INKActionNeedT * action_need);
-  inkapi INKError INKRecordSetCounter(char *rec_name, INKCounter counter_val, INKActionNeedT * action_need);
-  inkapi INKError INKRecordSetFloat(char *rec_name, INKFloat float_val, INKActionNeedT * action_need);
-  inkapi INKError INKRecordSetString(char *rec_name, INKString string_val, INKActionNeedT * action_need);
+  inkapi INKError INKRecordSet(const char *rec_name, const char *val, INKActionNeedT * action_need);
+  inkapi INKError INKRecordSetInt(const char *rec_name, INKInt int_val, INKActionNeedT * action_need);
+  inkapi INKError INKRecordSetCounter(const char *rec_name, INKCounter counter_val, INKActionNeedT * action_need);
+  inkapi INKError INKRecordSetFloat(const char *rec_name, INKFloat float_val, INKActionNeedT * action_need);
+  inkapi INKError INKRecordSetString(const char *rec_name, const char *string_val, INKActionNeedT * action_need);
 
 /* INKRecordSetMlt: sets a set of records
  * Input:  rec_list     - list of record names the user wants to set; 
@@ -1726,7 +1726,7 @@ typedef enum
 
   inkapi INKError INKSetNICDown(INKString nic_name, INKString ip_addrr);
 
-  inkapi INKError INKSetSearchDomain(INKString search_name);
+  inkapi INKError INKSetSearchDomain(const char *search_name);
 
   inkapi INKError INKSetRmRealm(const char *hostname);
 

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/CoreAPIRemote.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/CoreAPIRemote.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/CoreAPIRemote.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/CoreAPIRemote.cc Tue Apr 27 19:12:22 2010
@@ -65,7 +65,7 @@ extern int event_socket_fd;
 INKError send_and_parse_basic(OpType op);
 INKError send_and_parse_list(OpType op, LLQ * list);
 INKError send_and_parse_name(OpType op, char *name);
-INKError mgmt_record_set(char *rec_name, char *rec_val, INKActionNeedT * action_need);
+INKError mgmt_record_set(const char *rec_name, const char *rec_val, INKActionNeedT * action_need);
 bool start_binary(const char *abs_bin_path);
 char *get_root_dir();
 
@@ -181,7 +181,7 @@ send_and_parse_name(OpType op, char *nam
  * void*. Just read out the string from socket and pass it MgmtRecordSet.
  */
 INKError
-mgmt_record_set(char *rec_name, char *rec_val, INKActionNeedT * action_need)
+mgmt_record_set(const char *rec_name, const char *rec_val, INKActionNeedT * action_need)
 {
   INKError err;
 
@@ -294,7 +294,7 @@ terminate_signal(int sig)
 
 
 INKError
-Init(char *socket_path)
+Init(const char *socket_path)
 {
   INKError err = INK_ERR_OKAY;
 
@@ -490,7 +490,7 @@ HardRestart()
 // note that the record value is being sent as chunk of memory, regardless of
 // record type; it's not being converted to a string!!
 INKError
-MgmtRecordGet(char *rec_name, INKRecordEle * rec_ele)
+MgmtRecordGet(const char *rec_name, INKRecordEle * rec_ele)
 {
   INKError ret;
   void *val;
@@ -535,7 +535,7 @@ MgmtRecordGet(char *rec_name, INKRecordE
 
 
 INKError
-MgmtRecordSet(char *rec_name, char *val, INKActionNeedT * action_need)
+MgmtRecordSet(const char *rec_name, const char *val, INKActionNeedT * action_need)
 {
   INKError ret;
 
@@ -549,7 +549,7 @@ MgmtRecordSet(char *rec_name, char *val,
 // first convert the MgmtInt into a string
 // NOTE: use long long, not just long, MgmtInt = ink64
 INKError
-MgmtRecordSetInt(char *rec_name, MgmtInt int_val, INKActionNeedT * action_need)
+MgmtRecordSetInt(const char *rec_name, MgmtInt int_val, INKActionNeedT * action_need)
 {
   char str_val[MAX_RECORD_SIZE];
   INKError ret;
@@ -566,7 +566,7 @@ MgmtRecordSetInt(char *rec_name, MgmtInt
 
 // first convert the MgmtIntCounter into a string
 INKError
-MgmtRecordSetCounter(char *rec_name, MgmtIntCounter counter_val, INKActionNeedT * action_need)
+MgmtRecordSetCounter(const char *rec_name, MgmtIntCounter counter_val, INKActionNeedT * action_need)
 {
   char str_val[MAX_RECORD_SIZE];
   INKError ret;
@@ -583,7 +583,7 @@ MgmtRecordSetCounter(char *rec_name, Mgm
 
 // first convert the MgmtFloat into string
 INKError
-MgmtRecordSetFloat(char *rec_name, MgmtFloat float_val, INKActionNeedT * action_need)
+MgmtRecordSetFloat(const char *rec_name, MgmtFloat float_val, INKActionNeedT * action_need)
 {
   char str_val[MAX_RECORD_SIZE];
   INKError ret;
@@ -598,7 +598,7 @@ MgmtRecordSetFloat(char *rec_name, MgmtF
 
 
 INKError
-MgmtRecordSetString(char *rec_name, MgmtString string_val, INKActionNeedT * action_need)
+MgmtRecordSetString(const char *rec_name, const char *string_val, INKActionNeedT * action_need)
 {
   INKError ret;
 
@@ -857,7 +857,7 @@ StatsReset()
  * location specified by "filepath"  
  */
 INKError
-EncryptToFile(char *passwd, char *filepath)
+EncryptToFile(const char *passwd, const char *filepath)
 {
   INKError err;
 

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/NetworkUtilsRemote.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/NetworkUtilsRemote.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/NetworkUtilsRemote.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/NetworkUtilsRemote.cc Tue Apr 27 19:12:22 2010
@@ -570,7 +570,7 @@ send_request_name(int fd, OpType op, cha
  * note: format: <OpType> <name-len> <val-len> <name> <val>
  **********************************************************************/
 INKError
-send_request_name_value(int fd, OpType op, char *name, char *value)
+send_request_name_value(int fd, OpType op, const char *name, const char *value)
 {
   char *msg_buf;
   int msg_pos = 0, total_len;
@@ -1313,7 +1313,7 @@ parse_file_read_reply(int fd, int *ver, 
 
   // check size before reading text
   if ((*size) <= 0) {
-    *text = "";                 // set to empty string
+    *text = ink_strndup("", 1);                 // set to empty string
   } else {
     // now we got the size, we can read everything into our msg * then parse it
     *text = (char *) xmalloc(sizeof(char) * (f_size + 1));

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/NetworkUtilsRemote.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/NetworkUtilsRemote.h?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/NetworkUtilsRemote.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/NetworkUtilsRemote.h Tue Apr 27 19:12:22 2010
@@ -70,7 +70,7 @@ void *socket_test_thread(void *arg);
  *****************************************************************************/
 INKError send_request(int fd, OpType op);
 INKError send_request_name(int fd, OpType op, char *name);
-INKError send_request_name_value(int fd, OpType op, char *name, char *value);
+INKError send_request_name_value(int fd, OpType op, const char *name, const char *value);
 
 INKError send_file_read_request(int fd, INKFileNameT file);
 INKError send_file_write_request(int fd, INKFileNameT file, int ver, int size, char *text);

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.cc Tue Apr 27 19:12:22 2010
@@ -85,8 +85,7 @@ const char *
   CLI_globals::sep2 = "**************************************" "**************************************\n";
 
 // Initialization of global Table of command levels with their prompts
-const
-  CLI_globals::CLI_LevelDesc
+  const CLI_globals::CLI_LevelDesc
   CLI_globals::cmdLD[] = {
   {CL_BASE, "cli->;"},
   {CL_MONITOR, "monitor->;"},
@@ -1107,12 +1106,13 @@ handleCLI(int cliFD,            /* IN: U
 void
 handleOverseer(int fd, int mode)
 {
-  char *ok = "Ok", buf[8192], reply[2048];
+  const char *ok = "Ok";
+  char buf[8192], reply[2048];
   RecDataT mtype = RECD_NULL;
 
   bool command_allowed;
 
-  static char *help_lines[] = {
+  static const char *help_lines[] = {
     "",
     "  Traffic Server Overseer Port",
     "",

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.h?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.h Tue Apr 27 19:12:22 2010
@@ -46,16 +46,16 @@ struct CLI_globals
   typedef struct CLI_LevelDesc
   {
     cmdline_states cmdlevel;    /* command line level */
-    char *cmdprompt;            /* command line level prompt */
+    const char *cmdprompt;            /* command line level prompt */
   } CLI_LevelDesc;
 
   /* Variable / Description pairs */
   typedef struct VarNameDesc
   {
-    char *name;                 /* node variable name */
-    char *cname;                /* cluster variable name (if one exits) */
-    char *desc;                 /* variable description */
-    char *format;               /* format string */
+    const char *name;                 /* node variable name */
+    const char *cname;                /* cluster variable name (if one exits) */
+    const char *desc;                 /* variable description */
+    const char *format;               /* format string */
     int name_value_width;       /* field width for name value */
     int cname_value_width;      /* field width for cname value */
     int desc_width;             /* width of description field */

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLIeventHandler.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLIeventHandler.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLIeventHandler.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLIeventHandler.cc Tue Apr 27 19:12:22 2010
@@ -73,14 +73,14 @@ CmdLine_EventHandler::~CmdLine_EventHand
 
 /****************************** Member fcns *******************************/
 
-inline char *
+inline const char *
 CmdLine_EventHandler::command_prompt()
 {
   return cmdprompt;
 }
 
 inline void
-CmdLine_EventHandler::command_prompt(char *new_prompt)
+CmdLine_EventHandler::command_prompt(const char *new_prompt)
 {
   cmdprompt = new_prompt ? new_prompt : NULL;
 }

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLIeventHandler.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLIeventHandler.h?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLIeventHandler.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLIeventHandler.h Tue Apr 27 19:12:22 2010
@@ -129,8 +129,8 @@ class CmdLine_EventHandler:public AbsEve
 private:
   /* variables */
   char *cmdmode;                /* command mode i.e. batch(b) or interactive(i) */
-  char *cmdprompt;              /* what prompt should look like e.g '->' */
-  char *dcmdprompt;             /* default prompt */
+  const char *cmdprompt;              /* what prompt should look like e.g '->' */
+  const char *dcmdprompt;             /* default prompt */
   char *args;                   /* arugments passed to this level */
   cmdline_states curr_state;    /* current command line state */
 
@@ -173,8 +173,8 @@ public:
    ~CmdLine_EventHandler(void);
 
   /* Member fcns */
-  char *command_prompt();       /* get prompt */
-  void command_prompt(char *new_prompt);        /* set prompt */
+  const char *command_prompt();       /* get prompt */
+  void command_prompt(const char *new_prompt);        /* set prompt */
   char *arguments();            /* get args */
   void arguments(char *new_args);       /* set args */
   char *command_mode();         /* get command mode */

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliDisplay.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliDisplay.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliDisplay.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliDisplay.cc Tue Apr 27 19:12:22 2010
@@ -182,7 +182,7 @@ Cli_Debug(const char *string, ...)
 }
 
 int
-Cli_PrintEnable(char *string, int flag)
+Cli_PrintEnable(const char *string, int flag)
 {
   if (flag == 0)
     Cli_Printf("%soff\n", string);

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliDisplay.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliDisplay.h?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliDisplay.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliDisplay.h Tue Apr 27 19:12:22 2010
@@ -85,7 +85,7 @@ int Cli_SetPrintLevel(CliPrintLevelT lev
 CliPrintLevelT Cli_GetPrintLevel();
 int Cli_Printf(const char *string, ...);
 int Cli_Debug(const char *string, ...);
-int Cli_PrintEnable(char *string, int flag);
+int Cli_PrintEnable(const char *string, int flag);
 int Cli_PrintOnOff(int flag);
 int Cli_PrintArg(int arg_index, const cli_parsedArgInfo * argtable);
 #endif // __CLI_ERROR_HANDLE_H__

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliMgmtUtils.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliMgmtUtils.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliMgmtUtils.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliMgmtUtils.cc Tue Apr 27 19:12:22 2010
@@ -55,7 +55,7 @@ Cli_RecordGet(const char *rec_name, INKR
 
 // Get an integer type records.config variable
 INKError
-Cli_RecordGetInt(char *rec_name, INKInt * int_val)
+Cli_RecordGetInt(const char *rec_name, INKInt * int_val)
 {
   INKError status;
   if ((status = INKRecordGetInt(rec_name, int_val))) {
@@ -67,7 +67,7 @@ Cli_RecordGetInt(char *rec_name, INKInt 
 
 // Get an counter type records.config variable
 INKError
-Cli_RecordGetCounter(char *rec_name, INKCounter * ctr_val)
+Cli_RecordGetCounter(const char *rec_name, INKCounter * ctr_val)
 {
   INKError status;
   if ((status = INKRecordGetCounter(rec_name, ctr_val))) {
@@ -79,7 +79,7 @@ Cli_RecordGetCounter(char *rec_name, INK
 
 // Get a float type records.config variable
 INKError
-Cli_RecordGetFloat(char *rec_name, INKFloat * float_val)
+Cli_RecordGetFloat(const char *rec_name, INKFloat * float_val)
 {
   INKError status;
   if ((status = INKRecordGetFloat(rec_name, float_val))) {
@@ -91,7 +91,7 @@ Cli_RecordGetFloat(char *rec_name, INKFl
 
 // Get a string type records.config variable
 INKError
-Cli_RecordGetString(char *rec_name, INKString * string_val)
+Cli_RecordGetString(const char *rec_name, char **string_val)
 {
   INKError status;
   if ((status = INKRecordGetString(rec_name, string_val))) {
@@ -115,7 +115,7 @@ Cli_RecordSet(const char *rec_name, cons
 
 // Set an integer type records.config variable
 INKError
-Cli_RecordSetInt(char *rec_name, INKInt int_val, INKActionNeedT * action_need)
+Cli_RecordSetInt(const char *rec_name, INKInt int_val, INKActionNeedT * action_need)
 {
   INKError status;
   if ((status = INKRecordSetInt(rec_name, int_val, action_need))) {
@@ -127,7 +127,7 @@ Cli_RecordSetInt(char *rec_name, INKInt 
 
 // Set a float type records.config variable
 INKError
-Cli_RecordSetFloat(char *rec_name, INKFloat float_val, INKActionNeedT * action_need)
+Cli_RecordSetFloat(const char *rec_name, INKFloat float_val, INKActionNeedT * action_need)
 {
   INKError status;
   if ((status = INKRecordSetFloat(rec_name, float_val, action_need))) {
@@ -140,7 +140,7 @@ Cli_RecordSetFloat(char *rec_name, INKFl
 
 // Set a string type records.config variable
 INKError
-Cli_RecordSetString(char *rec_name, INKString str_val, INKActionNeedT * action_need)
+Cli_RecordSetString(const char *rec_name, INKString str_val, INKActionNeedT * action_need)
 {
   INKError status;
   if ((status = INKRecordSetString(rec_name, str_val, action_need))) {
@@ -343,7 +343,7 @@ Cli_EvalOnOffString(char *stringval)
 // on_off = "on" mean 1, "off" mean 0
 //
 int
-Cli_RecordOnOff_Action(int action, char *record, char *on_off)
+Cli_RecordOnOff_Action(int action, const char *record, const char *on_off)
 {
   INKActionNeedT action_need;
   INKError status;
@@ -392,7 +392,7 @@ Cli_RecordOnOff_Action(int action, char 
 // value = the integer value used by RECORD_SET
 //
 int
-Cli_RecordInt_Action(int action, char *record, int value)
+Cli_RecordInt_Action(int action, const char *record, int value)
 {
   switch (action) {
   case RECORD_SET:
@@ -480,7 +480,7 @@ Cli_RecordHostname_Action(int action, ch
 // string_val = string to set
 //
 int
-Cli_RecordString_Action(int action, char *record, char *string_val)
+Cli_RecordString_Action(int action, const char *record, char *string_val)
 {
   INKError status;
   INKActionNeedT action_need = INK_ACTION_UNDEFINED;
@@ -521,7 +521,7 @@ Cli_RecordString_Action(int action, char
 // url = if non-NULL, update the file using contents of URL
 //
 int
-Cli_ConfigFileURL_Action(INKFileNameT file, char *filename, const char *url)
+Cli_ConfigFileURL_Action(INKFileNameT file, const char *filename, const char *url)
 {
   INKError status;
   // Retrieve  file from url
@@ -540,7 +540,7 @@ Cli_ConfigFileURL_Action(INKFileNameT fi
 }
 
 int
-cliCheckIfEnabled(char *command)
+cliCheckIfEnabled(const char *command)
 {
   if (enable_restricted_commands == FALSE) {
     Cli_Error("\n%s is a restricted command only accessible from enable mode\n\n", command);

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliMgmtUtils.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliMgmtUtils.h?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliMgmtUtils.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliMgmtUtils.h Tue Apr 27 19:12:22 2010
@@ -49,28 +49,28 @@
 INKError Cli_RecordGet(const char *rec_name, INKRecordEle * rec_val);
 
 // Get an integer type records.config variable
-INKError Cli_RecordGetInt(char *rec_name, INKInt * int_val);
+INKError Cli_RecordGetInt(const char *rec_name, INKInt * int_val);
 
 // Get an counter type records.config variable
-INKError Cli_RecordGetCounter(char *rec_name, INKCounter * ctr_val);
+INKError Cli_RecordGetCounter(const char *rec_name, INKCounter * ctr_val);
 
 // Get a float type records.config variable
-INKError Cli_RecordGetFloat(char *rec_name, INKFloat * float_val);
+INKError Cli_RecordGetFloat(const char *rec_name, INKFloat * float_val);
 
 // Get a string type records.config variable
-INKError Cli_RecordGetString(char *rec_name, INKString * string_val);
+INKError Cli_RecordGetString(const char *rec_name, char **string_val);
 
 // Use a string to set a records.config variable
 INKError Cli_RecordSet(const char *rec_name, const char *rec_value, INKActionNeedT * action_need);
 
 // Set an integer type records.config variable
-INKError Cli_RecordSetInt(char *rec_name, INKInt int_val, INKActionNeedT * action_need);
+INKError Cli_RecordSetInt(const char *rec_name, INKInt int_val, INKActionNeedT * action_need);
 
 //Set a float type records.config variable
-INKError Cli_RecordSetFloat(char *rec_name, INKFloat float_val, INKActionNeedT * action_need);
+INKError Cli_RecordSetFloat(const char *rec_name, INKFloat float_val, INKActionNeedT * action_need);
 
 // Set a string type records.config variable  
-INKError Cli_RecordSetString(char *rec_name, INKString str_val, INKActionNeedT * action_need);
+INKError Cli_RecordSetString(const char *rec_name, INKString str_val, INKActionNeedT * action_need);
 
 // Retrieve and display contents of a rules file
 INKError Cli_DisplayRules(INKFileNameT fname);
@@ -102,7 +102,7 @@ int Cli_EvalOnOffString(char *stringval)
 //
 // on_off = "on" mean 1, "off" mean 0
 //
-int Cli_RecordOnOff_Action(int action, char *record, char *on_off);
+int Cli_RecordOnOff_Action(int action, const char *record, const char *on_off);
 
 ////////////////////////////////////////////////////////////////
 // Cli_RecordInt_Action
@@ -116,7 +116,7 @@ int Cli_RecordOnOff_Action(int action, c
 //
 // value = the integer value used by RECORD_SET
 //
-int Cli_RecordInt_Action(int action, char *record, int value);
+int Cli_RecordInt_Action(int action, const char *record, int value);
 
 ////////////////////////////////////////////////////////////////
 // Cli_RecordHostname_Action
@@ -131,7 +131,7 @@ int Cli_RecordInt_Action(int action, cha
 //
 // hostname = string to set
 //
-int Cli_RecordHostname_Action(int action, char *record, char *hostname);
+int Cli_RecordHostname_Action(int action, const char *record, char *hostname);
 
 ////////////////////////////////////////////////////////////////
 // Cli_RecordString_Action
@@ -145,7 +145,7 @@ int Cli_RecordHostname_Action(int action
 //
 // string_val = string to set
 //
-int Cli_RecordString_Action(int action, char *record, char *string_val);
+int Cli_RecordString_Action(int action, const char *record, char *string_val);
 
 ////////////////////////////////////////////////////////////////
 // Cli_ConfigFileURL_Action
@@ -158,11 +158,11 @@ int Cli_RecordString_Action(int action, 
 //
 // url = if non-NULL, update the file using contents of URL
 //
-int Cli_ConfigFileURL_Action(INKFileNameT file, char *filename, const char *url);
+int Cli_ConfigFileURL_Action(INKFileNameT file, const char *filename, const char *url);
 
 extern int enable_restricted_commands;
 
-int cliCheckIfEnabled(char *command);
+int cliCheckIfEnabled(const char *command);
 
 int GetTSDirectory(char *ts_path, size_t ts_path_len);
 

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/ConfigCmd.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/ConfigCmd.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/ConfigCmd.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/ConfigCmd.cc Tue Apr 27 19:12:22 2010
@@ -61,7 +61,7 @@
 
 int enable_restricted_commands = FALSE;
 
-static int find_value(char *pathname, char *key, char *value, int value_len, char *delim, int no);
+static int find_value(const char *pathname, const char *key, char *value, int value_len, const char *delim, int no);
 
 int
 u_getch(void)
@@ -6331,7 +6331,7 @@ ConfigAlarmNotify(char *string_val)
 }
 
 int
-find_value(char *pathname, char *key, char *value, int value_len, char *delim, int no)
+find_value(const char *pathname, const char *key, char *value, int value_len, const char *delim, int no)
 {
   char buffer[1024];
   char *pos;
@@ -6381,7 +6381,7 @@ find_value(char *pathname, char *key, ch
 }
 
 int
-ConfigRadiusKeys(char *record)
+ConfigRadiusKeys(const char *record)
 {
 
   char new_passwd1[256], new_passwd2[256], ch = ' ';

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/ConfigCmd.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/ConfigCmd.h?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/ConfigCmd.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/ConfigCmd.h Tue Apr 27 19:12:22 2010
@@ -1117,5 +1117,5 @@ int ConfigAlarmResolveAll();
 int ConfigAlarmNotify(char *stringval);
 
 // config:radius keys
-int ConfigRadiusKeys(char *record);
+int ConfigRadiusKeys(const char *record);
 #endif // __CONFIG_CMD_H__

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/ShowCmd.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/ShowCmd.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/ShowCmd.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/ShowCmd.cc Tue Apr 27 19:12:22 2010
@@ -2130,9 +2130,9 @@ ShowCache()
   INKInt doc_life = -1;
   INKInt dynamic_urls = -1;
   INKInt alternates = -1;
-  INKString vary_def_text = "NONE";
-  INKString vary_def_image = "NONE";
-  INKString vary_def_other = "NONE";
+  const char *vary_def_text = "NONE";
+  const char *vary_def_image = "NONE";
+  const char *vary_def_other = "NONE";
   INKInt cookies = -1;
 
   // retrieve values
@@ -2149,9 +2149,9 @@ ShowCache()
   Cli_RecordGetInt("proxy.config.http.ftp.cache.document_lifetime", &doc_life);
   Cli_RecordGetInt("proxy.config.http.cache.cache_urls_that_look_dynamic", &dynamic_urls);
   Cli_RecordGetInt("proxy.config.http.cache.enable_default_vary_headers", &alternates);
-  Cli_RecordGetString("proxy.config.http.cache.vary_default_text", &vary_def_text);
-  Cli_RecordGetString("proxy.config.http.cache.vary_default_images", &vary_def_image);
-  Cli_RecordGetString("proxy.config.http.cache.vary_default_other", &vary_def_other);
+  Cli_RecordGetString("proxy.config.http.cache.vary_default_text", (char**)&vary_def_text);
+  Cli_RecordGetString("proxy.config.http.cache.vary_default_images", (char**)&vary_def_image);
+  Cli_RecordGetString("proxy.config.http.cache.vary_default_other", (char**)&vary_def_other);
 
   Cli_RecordGetInt("proxy.config.http.cache.cache_responses_to_cookies", &cookies);
 
@@ -2381,7 +2381,7 @@ ShowLogging()
   INKInt log_space = -1;
   INKInt headroom_space = -1;
   INKInt collation_mode = 0;
-  INKString collation_host = "None";
+  const char *collation_host = "None";
   INKInt collation_port = -1;
   INKString collation_secret = NULL;
   INKInt host_tag = 0;
@@ -2422,7 +2422,7 @@ ShowLogging()
   Cli_RecordGetInt("proxy.config.log2.max_space_mb_for_logs", &log_space);
   Cli_RecordGetInt("proxy.config.log2.max_space_mb_headroom", &headroom_space);
   Cli_RecordGetInt("proxy.local.log2.collation_mode", &collation_mode);
-  Cli_RecordGetString("proxy.config.log2.collation_host", &collation_host);
+  Cli_RecordGetString("proxy.config.log2.collation_host", (char**)&collation_host);
   Cli_RecordGetInt("proxy.config.log2.collation_port", &collation_port);
   Cli_RecordGetString("proxy.config.log2.collation_secret", &collation_secret);
   Cli_RecordGetInt("proxy.config.log2.collation_host_tagged", &host_tag);

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/createArgument.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/createArgument.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/createArgument.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/createArgument.cc Tue Apr 27 19:12:22 2010
@@ -60,7 +60,7 @@ extern void setReqdArgs(char **required_
 
 int
 createArgument(const char *argument, int position, int commandoption,
-               char *range, int argumentRef, char *helpString, char *defValue)
+               char *range, int argumentRef, const char *helpString, char *defValue)
 {
   int arg_type = 0;
   int arg_option = 0;

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/createArgument.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/createArgument.h?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/createArgument.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/createArgument.h Tue Apr 27 19:12:22 2010
@@ -91,7 +91,7 @@ typedef struct cli_parsedArgInfo
 
 typedef struct cli_cmdCallbackInfo
 {
-  char *command_usage;
+  const char *command_usage;
   cli_parsedArgInfo *parsedArgTable;
   void *userdata;
 } cli_cmdCallbackInfo;
@@ -99,7 +99,7 @@ typedef struct cli_cmdCallbackInfo
 
 typedef struct cli_CommandInfo
 {
-  char *command_name;           /* command name    */
+  const char *command_name;           /* command name    */
   cli_ArgvInfo *argtable;       /* pointer to argv table */
   char **reqd_args;             /* holds reference no for 
                                    required arguments */
@@ -109,7 +109,7 @@ typedef struct cli_CommandInfo
 } cli_CommandInfo;
 
 extern int createArgument(const char *argument, int position, int commandoption,
-                          char *range, int argumentRef, char *helpString, char *defValue);
+                          char *range, int argumentRef, const char *helpString, char *defValue);
 
 
 

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/createCommand.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/createCommand.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/createCommand.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/createCommand.cc Tue Apr 27 19:12:22 2010
@@ -53,8 +53,8 @@ extern int cliSetArgvInfo(cli_ArgvInfo *
 
 
 int
-createCommand(char *cmdName, Tcl_CmdProc cmdFuncPtr,
-              createArgumentFuncPtr argvFuncPtr, cmdTerritory cmdScope, char *usage, char *helpString)
+createCommand(const char *cmdName, Tcl_CmdProc cmdFuncPtr,
+              createArgumentFuncPtr argvFuncPtr, cmdTerritory cmdScope, const char *usage, const char *helpString)
 {
   /* No code to support threads for Tcl */
 

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/createCommand.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/createCommand.h?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/createCommand.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/createCommand.h Tue Apr 27 19:12:22 2010
@@ -53,7 +53,7 @@
                                 the customer.
 */
 
-extern int createCommand(char *cmdName, Tcl_CmdProc * cmdFuncPtr,
-                         createArgumentFuncPtr argvFuncPtr, cmdTerritory cmdScope, char *usage, char *helpstring);
+extern int createCommand(const char *cmdName, Tcl_CmdProc * cmdFuncPtr,
+                         createArgumentFuncPtr argvFuncPtr, cmdTerritory cmdScope, const char *usage, const char *helpstring);
 
 #endif /* CREATE_COMMAND */

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/hashtable.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/hashtable.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/hashtable.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/hashtable.cc Tue Apr 27 19:12:22 2010
@@ -97,8 +97,8 @@ cliCreateCommandHashtable()
 
 
 int
-cliAddCommandtoHashtable(char *name, cli_ArgvInfo * argtable,
-                         char **reqd_args, cli_parsedArgInfo * parsedArgTable, char *helpString)
+cliAddCommandtoHashtable(const char *name, cli_ArgvInfo * argtable,
+                         char **reqd_args, cli_parsedArgInfo * parsedArgTable, const char *helpString)
 {
   Tcl_HashEntry *entryPtr;
   int newCmd;

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/hashtable.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/hashtable.h?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/hashtable.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cli2/hashtable.h Tue Apr 27 19:12:22 2010
@@ -33,8 +33,8 @@
 
 extern int cliCreateCommandHashtable();
 
-extern int cliAddCommandtoHashtable(char *name, cli_ArgvInfo * argtable, char **reqd_args,
-                                    cli_parsedArgInfo * parsedArgTable, char *helpString);
+extern int cliAddCommandtoHashtable(const char *name, cli_ArgvInfo * argtable, char **reqd_args,
+                                    cli_parsedArgInfo * parsedArgTable, const char *helpString);
 
 extern cli_CommandInfo *cliGetCommandArgsfromHashtable(char *name);
 

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.cc Tue Apr 27 19:12:22 2010
@@ -211,7 +211,8 @@ drainIncomingChannel(void *arg)
              * Explicit virtual ip unmap request. Note order unmap then 
              * map for strstr. 
              */
-            char msg_ip[80], *msg;
+            char msg_ip[80];
+            const char *msg;
             if (sscanf(message, "unmap: %79s", msg_ip) != 1) {
               ink_close_socket(req_fd);
               continue;
@@ -236,7 +237,8 @@ drainIncomingChannel(void *arg)
           } else if (strstr(message, "map: ")) {
 
             /* Explicit virtual ip map request */
-            char msg_ip[80], *msg;
+            char msg_ip[80];
+            const char *msg;
             if (sscanf(message, "map: %79s", msg_ip) != 1) {
               ink_close_socket(req_fd);
               continue;
@@ -296,7 +298,7 @@ drainIncomingChannel(void *arg)
             }
 
             if (!stat) {
-              char *msg = "file: failed";
+              const char *msg = "file: failed";
               mgmt_writeline(req_fd, msg, strlen(msg));
             }
             if (buff)
@@ -1887,7 +1889,7 @@ bool
 ClusterCom::sendClusterMessage(int msg_type)
 {
   bool ret = true, tmp_ret;
-  char *msg;
+  const char *msg;
   InkHashTableEntry *entry;
   InkHashTableIteratorState iterator_state;
 
@@ -1963,7 +1965,7 @@ ClusterCom::sendReliableMessage(unsigned
  *   Used to send a string across the reliable fd.
  */
 bool
-ClusterCom::rl_sendReliableMessage(unsigned long addr, char *buf, int len)
+ClusterCom::rl_sendReliableMessage(unsigned long addr, const char *buf, int len)
 {
   int fd, cport;
   char string_addr[80];
@@ -2270,7 +2272,7 @@ ClusterCom::lowestPeer(int *no)
 
 
 void
-ClusterCom::logClusterMismatch(char *ip, ClusterMismatch type, char *data)
+ClusterCom::logClusterMismatch(const char *ip, ClusterMismatch type, char *data)
 {
 
   void *value;
@@ -2354,7 +2356,7 @@ checkBackDoor(int req_fd, char *message)
   char reply[4096];
 
   if (strstr(message, "show_map")) {
-    char *tmp_msg;
+    const char *tmp_msg;
     bool map_empty = true;
     InkHashTableEntry *entry;
     InkHashTableIteratorState iterator_state;
@@ -2488,7 +2490,8 @@ checkBackDoor(int req_fd, char *message)
 
     for (entry = ink_hash_table_iterator_first(lmgmt->ccom->peers, &iterator_state);
          entry != NULL; entry = ink_hash_table_iterator_next(lmgmt->ccom->peers, &iterator_state)) {
-      char *tmp_msg, ip_addr[80];
+      const char *tmp_msg;
+      char ip_addr[80];
       struct in_addr addr;
 
       ClusterPeerInfo *tmp = (ClusterPeerInfo *) ink_hash_table_entry_value(lmgmt->ccom->peers, entry);

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.h?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.h Tue Apr 27 19:12:22 2010
@@ -121,7 +121,7 @@ public:
   bool sendOutgoingMessage(char *buf, int len);
   bool sendReliableMessage(unsigned long addr, char *buf, int len);
 
-  bool rl_sendReliableMessage(unsigned long addr, char *buf, int len);
+  bool rl_sendReliableMessage(unsigned long addr, const char *buf, int len);
   bool sendReliableMessage(unsigned long addr, char *buf, int len, char *reply, int len2, bool take_lock);
   bool sendReliableMessageReadTillClose(unsigned long addr, char *buf, int len, textBuffer * reply);
 
@@ -136,7 +136,7 @@ public:
     return our_ip;
   }
 
-  void logClusterMismatch(char *ip, ClusterMismatch type, char *data);
+  void logClusterMismatch(const char *ip, ClusterMismatch type, char *data);
 
   InkHashTable *mismatchLog;    // drainer thread use only
 

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc Tue Apr 27 19:12:22 2010
@@ -156,7 +156,7 @@ static InkHashTable *configTable = NULL;
 
 
 static void
-cop_log(int priority, char *format, ...)
+cop_log(int priority, const char *format, ...)
 {
   va_list args;
   char buffer[8192];
@@ -537,14 +537,14 @@ build_config_table(FILE * fp)
 }
 
 static int
-config_exists(char *str)
+config_exists(const char *str)
 {
   InkHashTableValue hval;
   return ink_hash_table_lookup(configTable, str, &hval);
 }
 
 static void
-read_config_string(char *str, char *val, size_t val_len)
+read_config_string(const char *str, char *val, size_t val_len)
 {
   InkHashTableValue hval;
   char *p, *buf;
@@ -579,7 +579,7 @@ ConfigStrFatalError:
 }
 
 static void
-read_config_int(char *str, int *val, bool miss_ok = false)
+read_config_int(const char *str, int *val, bool miss_ok = false)
 {
   InkHashTableValue hval;
   char *p, *buf;
@@ -1203,7 +1203,7 @@ poll_write(int fd, int timeout)
 }
 
 static int
-open_socket(int port, char *ip = NULL, char *ip_to_bind = NULL)
+open_socket(int port, const char *ip = NULL, char *ip_to_bind = NULL)
 {
 
   int sock;

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/preparse/IPRange.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/preparse/IPRange.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/preparse/IPRange.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/preparse/IPRange.cc Tue Apr 27 19:12:22 2010
@@ -86,7 +86,7 @@ read_an_ip(char *line, unsigned int *ip,
 
 // Returns 0 if successful, error string otherwise
 char *
-IPRange::read_table_from_file(int fd, char *identifier_str, bool localip)
+IPRange::read_table_from_file(int fd, const char *identifier_str, bool localip)
 {
   int i, j, n, rc, s, line_no;
   char c, line[MAXLINESIZE];

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/preparse/IPRange.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/preparse/IPRange.h?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/preparse/IPRange.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/preparse/IPRange.h Tue Apr 27 19:12:22 2010
@@ -43,7 +43,7 @@ public:
       lines.
 
   */
-  char *read_table_from_file(int fd, char *identifier_str, bool localip = TRUE);
+  char *read_table_from_file(int fd, const char *identifier_str, bool localip = TRUE);
     IPRange():n_ips(0), n_ip_ranges(0)
   {
 

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/preparse/RemapReadConfig.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/preparse/RemapReadConfig.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/preparse/RemapReadConfig.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/preparse/RemapReadConfig.cc Tue Apr 27 19:12:22 2010
@@ -44,7 +44,7 @@ parseRemapFile(int fd)
 {
   int entry = 0;
   char line[512];
-  char *err = NULL;
+  const char *err = NULL;
   char *errBuf;
   Tokenizer whiteTok(" \t\r\n");
   int numToks;

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/preparse/StoreReadConfig.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/preparse/StoreReadConfig.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/preparse/StoreReadConfig.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/preparse/StoreReadConfig.cc Tue Apr 27 19:12:22 2010
@@ -34,7 +34,7 @@ parseStorageFile(int fd)
 {
   int ln = 0;
   char line[256];
-  char *err = NULL;
+  const char *err = NULL;
   while (ink_file_fd_readline(fd, sizeof(line) - 1, line) > 0) {
     // update lines
 

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/stats/StatType.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/stats/StatType.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/stats/StatType.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/stats/StatType.cc Tue Apr 27 19:12:22 2010
@@ -238,7 +238,7 @@ StatExprToken::clean()
  * Print the token according to its type in a human-readable format. :)
  */
 void
-StatExprToken::print(char *prefix)
+StatExprToken::print(const char *prefix)
 {
 
   if (m_token_name != NULL) {
@@ -438,7 +438,7 @@ StatExprList::next(StatExprToken * curre
  *  Print the token in the expression in a human-readable format. :)
  */
 void
-StatExprList::print(char *prefix)
+StatExprList::print(const char *prefix)
 {
 
   for (StatExprToken * token = first(); token; token = next(token)) {

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/stats/StatType.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/stats/StatType.h?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/stats/StatType.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/stats/StatType.h Tue Apr 27 19:12:22 2010
@@ -126,7 +126,7 @@ public:
   // Member Functions
   void assignTokenName(const char *);
   bool assignTokenType();
-  void print(char *);
+  void print(const char *);
   short precedence();
   void copy(const StatExprToken &);
 
@@ -166,7 +166,7 @@ public:
   StatExprToken *first();
   StatExprToken *next(StatExprToken *);
   unsigned count();
-  void print(char *);
+  void print(const char *);
 
 private:
 

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/ConfigAPI.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/ConfigAPI.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/ConfigAPI.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/ConfigAPI.cc Tue Apr 27 19:12:22 2010
@@ -222,7 +222,7 @@ Config_GetDomain(char *domain, size_t do
 }
 
 int
-Config_SetDomain(char *domain)
+Config_SetDomain(const char *domain)
 {
   int status = -1;
 #if (HOST_OS != freebsd) && (HOST_OS != darwin)
@@ -1285,7 +1285,7 @@ XmlObject::LoadFile(char *file)
 }
 
 char *
-XmlObject::getXmlTagValue(char *XmlTagName)
+XmlObject::getXmlTagValue(const char *XmlTagName)
 {
   char XmlTagValue[1024];
   ink_strncpy(XmlTagValue, "", sizeof(XmlTagValue));
@@ -1312,7 +1312,7 @@ XmlObject::getXmlTagValue(char *XmlTagNa
 
 
 char *
-XmlObject::getXmlTagValueAndAttribute(char *XmlAttribute, char *XmlTagName)
+XmlObject::getXmlTagValueAndAttribute(char *XmlAttribute, const char *XmlTagName)
 {
   char XmlTagValue[1024];
   ink_strncpy(XmlTagValue, "", sizeof(XmlTagValue));

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/ConfigAPI.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/ConfigAPI.h?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/ConfigAPI.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/ConfigAPI.h Tue Apr 27 19:12:22 2010
@@ -38,8 +38,8 @@ public:
   {
   }
   int LoadFile(char *file);
-  char *getXmlTagValue(char *XmlTagName);
-  char *getXmlTagValueAndAttribute(char *XmlAttribute, char *XmlTagName);
+  char *getXmlTagValue(const char *XmlTagName);
+  char *getXmlTagValueAndAttribute(char *XmlAttribute, const char *XmlTagName);
 };
 
 extern int Config_GetHostname(char *hostname, size_t hostname_len);
@@ -47,7 +47,7 @@ extern int Config_SetHostname(char *host
 extern int Config_GetDefaultRouter(char *router, size_t len);
 extern int Config_SetDefaultRouter(char *router);
 extern int Config_GetDomain(char *domain, size_t domain_len);
-extern int Config_SetDomain(char *domain);
+extern int Config_SetDomain(const char *domain);
 extern int Config_GetDNS_Servers(char *dns, size_t dns_len);
 extern int Config_SetDNS_Servers(char *dns);
 extern int Config_GetDNS_Server(char *server, size_t server_len, int no);

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/NetConfig.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/NetConfig.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/NetConfig.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/NetConfig.cc Tue Apr 27 19:12:22 2010
@@ -652,7 +652,7 @@ up_interface(char *nic_name, bool static
   char hostname[1024], buf[1024];
   char etc_hostname_path[1024], etc_hostname_path_new[1024];
   FILE *fp, *fp1;
-  char *mv_binary = MV_BINARY;
+  const char *mv_binary = MV_BINARY;
   bool hostname_flag = false;
   char broadcast[17];
   char network_addr[17];
@@ -816,7 +816,7 @@ down_interface(char *nic_name)
 {
   int status;
   pid_t pid;
-  char *ifconfig_binary = IFCONFIG;
+  const char *ifconfig_binary = IFCONFIG;
 
   if ((pid = fork()) < 0) {
     exit(1);
@@ -845,7 +845,7 @@ mrtg_hostname_change(char *hostname, cha
   char buf[1024], tmp_buf[1024], mrtg_dir_path[1024], mrtg_path[1024], mrtg_path_new[1024], *index;
   FILE *fp;
   FILE *fp1;
-  char *mv_binary = MV_BINARY;
+  const char *mv_binary = MV_BINARY;
   int res;
   int status;
   pid_t pid;
@@ -915,7 +915,7 @@ set_hostname(char *hostname, char *old_h
   char etc_hostname_path[1024], etc_hostname_path_new[1024], ip_address[1024];
   FILE *fp;
   FILE *fp1;
-  char *mv_binary = MV_BINARY;
+  const char *mv_binary = MV_BINARY;
   int res;
   int status;
   pid_t pid;
@@ -1054,7 +1054,7 @@ set_gateway(char *ip_address, char *old_
   FILE *fp1;
   const char *mv_binary = MV_BINARY;
   int res;
-  char *route_binary = ROUTE_BINARY;
+  const char *route_binary = ROUTE_BINARY;
   int status;
   pid_t pid;
   char *pos;
@@ -1890,16 +1890,16 @@ int up_interface(char *nic_name, bool st
                  char *old_ip, char *old_netmask, char *old_gateway, char *default_gateway);
 int down_interface(char *nic_name);
 
-int overwriteFiles(char *source, char *dest, char *api_name);
+int overwriteFiles(char *source, char *dest, const char *api_name);
 // for default gateway
-int addRoute(char *dest, char *gateway, char *api_name);
+int addRoute(const char *dest, char *gateway, const char *api_name);
 // get to associate interface to a gateway
-int addRoute(char *dest, char *gateway, char *interface, char *api_name);
+int addRoute(const char *dest, char *gateway, char *interface, const char *api_name);
 // for default gateway
-int delRoute(char *dest, char *gateway, char *api_name);
+int delRoute(const char *dest, char *gateway, const char *api_name);
 // get to associate interface to a gateway
-int delRoute(char *dest, char *gateway, char *interface, char *api_name);
-int setIpAndMask(char *ip, char *mask, char *interface, char *api_name);
+int delRoute(const char *dest, char *gateway, char *interface, const char *api_name);
+int setIpAndMask(char *ip, char *mask, char *interface, const char *api_name);
 
 bool isLineCommented(char *line);
 bool defaultGatewayHasOwnEntry(char *default_gateway);
@@ -1946,7 +1946,7 @@ alphasort(const void *a, const void *b)
 }
 
 int
-overwriteFiles(char *source, char *dest, char *api_name)
+overwriteFiles(char *source, char *dest, const char *api_name)
 {
   char errmsg[200];
   pid_t pid;
@@ -1991,7 +1991,7 @@ createSymbolicLink(char *original_file, 
 }
 
 int
-changeFilePermission(char *mode, char *filename)
+changeFilePermission(const char *mode, char *filename)
 {
   char errmsg[200];
   pid_t pid;
@@ -2016,7 +2016,7 @@ changeFilePermission(char *mode, char *f
 }
 
 int
-delRoute(char *dest, char *gateway, char *api_name)
+delRoute(const char *dest, char *gateway, const char *api_name)
 {
   char errmsg[200];
   pid_t pid;
@@ -2042,7 +2042,7 @@ delRoute(char *dest, char *gateway, char
 }
 
 int
-delRoute(char *dest, char *gateway, char *interface, char *api_name)
+delRoute(const char *dest, char *gateway, char *interface, const char *api_name)
 {
   char errmsg[200];
   pid_t pid;
@@ -2067,7 +2067,7 @@ delRoute(char *dest, char *gateway, char
 }
 
 int
-addRoute(char *dest, char *gateway, char *api_name)
+addRoute(const char *dest, char *gateway, const char *api_name)
 {
   char errmsg[200];
   pid_t pid;
@@ -2091,7 +2091,7 @@ addRoute(char *dest, char *gateway, char
 }
 
 int
-addRoute(char *dest, char *gateway, char *interface, char *api_name)
+addRoute(const char *dest, char *gateway, char *interface, const char *api_name)
 {
   char errmsg[200];
   pid_t pid;
@@ -2117,7 +2117,7 @@ addRoute(char *dest, char *gateway, char
 }
 
 int
-setIpAndMask(char *ip, char *mask, char *interface, char *api_name)
+setIpAndMask(char *ip, char *mask, char *interface, const char *api_name)
 {
   char errmsg[200];
   pid_t pid;
@@ -2672,7 +2672,8 @@ fillEntryEtcHostnameFile(char *nic_name)
     gethostname(hostname, PATHLEN);
   }
 
-  if (strlen(hostname) == 0 || strcasestr(hostname, "unknown"))
+  char lstr[] = "unknown";
+  if (strlen(hostname) == 0 || strcasestr(hostname, lstr))
     snprintf(hostname, sizeof(hostname), "inkt_ts_%s", nic_name);
 
   FILE *fd;
@@ -2788,7 +2789,7 @@ down_interface(char *nic_name)
 {
   int status;
   pid_t pid;
-  char *ifconfig_binary = IFCONFIG;
+  const char *ifconfig_binary = IFCONFIG;
 
   if ((pid = fork()) < 0) {
     exit(1);
@@ -2831,9 +2832,10 @@ mrtg_hostname_change(char *hostname, cha
     perror("[net_config] scandir failed");
     return 1;
   }
+  char lstr[] = ".html";
   while (n--) {
     //printf("%s\n", namelist[n]->d_name);
-    if (strcasestr(namelist[n]->d_name, ".html") != NULL) {
+    if (strcasestr(namelist[n]->d_name, lstr) != NULL) {
       snprintf(mrtg_path, sizeof(mrtg_path), "%s/%s", mrtg_dir_path, namelist[n]->d_name);
       if ((fp = fopen(mrtg_path, "r")) == NULL) {
         perror("[net_config] failed to open mrtg file");
@@ -3077,9 +3079,10 @@ set_dns_server(char *dns_server_ips)
     return 1;
   }
   //  bool changed = false;
+  char lstr[] = "nameserver";
   fgets(buf, 1024, fp);
   while (!feof(fp)) {
-    if (strcasestr(buf, "nameserver")) {
+    if (strcasestr(buf, lstr)) {
       /*      if (!changed) {
          fprintf(fp1,"nameserver %s \n",dns_server_ips);
          changed = true;
@@ -3152,9 +3155,10 @@ set_domain_name(char *domain_name)
     return 1;
   }
 
+  char lstr[] = "domain";
   fgets(buf, 1024, fp);
   while (!feof(fp)) {
-    if (strcasestr(buf, "domain")) {
+    if (strcasestr(buf, lstr)) {
       fprintf(fp1, "domain %s \n", domain_name);
       domain_flag = true;
     } else
@@ -3208,9 +3212,10 @@ set_search_domain(char *search_name)
     return 1;
   }
 
+  char lstr[] = "search";
   fgets(buf, 1024, fp);
   while (!feof(fp)) {
-    if (strcasestr(buf, "search")) {
+    if (strcasestr(buf, lstr)) {
       fprintf(fp1, "search %s\n", search_name);
       search_flag = true;
     } else

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/SysAPI.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/SysAPI.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/SysAPI.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/SysAPI.cc Tue Apr 27 19:12:22 2010
@@ -78,7 +78,7 @@ int NetConfig_Action(int index, ...);
 int TimeConfig_Action(int index, bool restart, ...);
 int Net_GetNIC_Values(char *interface, char *status, char *onboot, char *static_ip, char *ip, char *netmask,
                       char *gateway);
-int find_value(char *pathname, char *key, char *value, size_t value_len, char *delim, int no);
+int find_value(const char *pathname, const char *key, char *value, size_t value_len, const char *delim, int no);
 static bool recordRegexCheck(const char *pattern, const char *value);
 static int getTSdirectory(char *ts_path, size_t ts_path_len);
 
@@ -171,7 +171,8 @@ Net_GetDefaultRouter(char *router, size_
     return !value;
   } else {
     char command[80];
-    char *tmp_file = "/tmp/route_status", buffer[256];
+    const char *tmp_file = "/tmp/route_status";
+    char buffer[256];
     FILE *fp;
 
     ink_strncpy(command, "/sbin/route -n > /tmp/route_status", sizeof(command));
@@ -255,7 +256,7 @@ Net_GetDomain(char *domain, size_t domai
 }
 
 int
-Net_SetDomain(char *domain)
+Net_SetDomain(const char *domain)
 {
   int status;
 
@@ -464,7 +465,8 @@ Net_GetNIC_IP(char *interface, char *ip,
   } else {
     Net_GetNIC_Status(interface, status, sizeof(status));
     if (strcmp(status, "up") == 0) {
-      char *tmp_file = "/tmp/dhcp_status", buffer[256];
+      const char *tmp_file = "/tmp/dhcp_status";
+      char buffer[256];
       FILE *fp;
 
       ink_strncpy(command, "/sbin/ifconfig ", sizeof(command));
@@ -521,7 +523,8 @@ Net_GetNIC_Netmask(char *interface, char
   } else {
     Net_GetNIC_Status(interface, status, sizeof(status));
     if (strcmp(status, "up") == 0) {
-      char *tmp_file = "/tmp/dhcp_status", buffer[256];
+      const char *tmp_file = "/tmp/dhcp_status";
+      char buffer[256];
       FILE *fp;
 
       ink_strncpy(command, "/sbin/ifconfig ", sizeof(command));
@@ -674,7 +677,7 @@ Net_SetNIC_Gateway(char *interface, char
 }
 
 int
-Net_SetNIC_Up(char *interface, char *onboot, char *protocol, char *ip, char *netmask, char *gateway)
+Net_SetNIC_Up(char *interface, char *onboot, char *protocol, char *ip, char *netmask, const char *gateway)
 {
   int status;
 
@@ -801,7 +804,7 @@ Sys_Grp_Inktomi(int egid)
 
 
 int
-find_value(char *pathname, char *key, char *value, size_t value_len, char *delim, int no)
+find_value(const char *pathname, const char *key, char *value, size_t value_len, const char *delim, int no)
 {
   char buffer[1024];
   char *pos;
@@ -937,7 +940,7 @@ Net_IsValid_IP(char *ip_addr)
 int
 NetConfig_Action(int index, ...)
 {
-  char *argv[10];
+  const char *argv[10];
   pid_t pid;
   int status;
 
@@ -1014,7 +1017,7 @@ NetConfig_Action(int index, ...)
 
     snprintf(command_path, sizeof(command_path), "%s/bin/net_config", ts_path);
 
-    res = execv(command_path, argv);
+    res = execv(command_path, (char* const*)argv);
 
     if (res != 0) {
       DPRINTF(("[SysAPI] fail to call net_config\n"));
@@ -1277,7 +1280,7 @@ Time_SetNTP_Off()
 int
 TimeConfig_Action(int index, bool restart ...)
 {
-  char *argv[20];
+  const char *argv[20];
   pid_t pid;
   int status;
 
@@ -1338,7 +1341,7 @@ TimeConfig_Action(int index, bool restar
     }
     snprintf(command_path, sizeof(command_path), "%s/bin/time_config", ts_path);
 
-    res = execv(command_path, argv);
+    res = execv(command_path, (char* const*)argv);
 
     if (res != 0) {
       DPRINTF(("[SysAPI] fail to call time_config\n"));
@@ -1420,7 +1423,7 @@ setSNMP(char *sys_location, char *sys_co
   FILE *fp, *ts_file, *fp1, *fp_ts, *fp1_ts, *snmppass_fp, *snmppass_fp1;
   pid_t pid;
   int i, status;
-  char *mv_binary = MV_BINARY;
+  const char *mv_binary = MV_BINARY;
 
   bool sys_location_flag = false;
   bool sys_contact_flag = false;
@@ -1920,7 +1923,7 @@ int NetConfig_Action(int index, ...);
 int TimeConfig_Action(int index, bool restart, ...);
 int Net_GetNIC_Values(char *interface, char *status, char *onboot, char *static_ip, char *ip, char *netmask,
                       char *gateway);
-int find_value(char *pathname, char *key, char *value, char *delim, int no);
+int find_value(const char *pathname, const char *key, char *value, const char *delim, int no);
 static bool recordRegexCheck(const char *pattern, const char *value);
 static int getTSdirectory(char *ts_path, size_t ts_path_len);
 
@@ -2134,7 +2137,7 @@ Net_GetDomain(char *domain, size_t domai
 }
 
 int
-Net_SetDomain(char *domain)
+Net_SetDomain(const char *domain)
 {
   int status;
 
@@ -2327,7 +2330,7 @@ Net_GetNIC_Protocol(char *interface, cha
 }
 
 int
-parseIfconfig(char *interface, char *keyword, char *value)
+parseIfconfig(char *interface, const char *keyword, char *value)
 {
 
   const int BUFFLEN = 200;
@@ -2673,7 +2676,7 @@ Net_SetNIC_Gateway(char *interface, char
 }
 
 int
-Net_SetNIC_Up(char *interface, char *onboot, char *protocol, char *ip, char *netmask, char *gateway)
+Net_SetNIC_Up(char *interface, char *onboot, char *protocol, char *ip, char *netmask, const char *gateway)
 {
   int status;
 
@@ -2739,7 +2742,7 @@ Net_IsValid_Interface(char *interface)
 }
 
 int
-find_value(char *pathname, char *key, char *value, char *delim, int no)
+find_value(const char *pathname, const char *key, char *value, const char *delim, int no)
 {
   char buffer[1024];
   char *pos;
@@ -2862,7 +2865,7 @@ Net_IsValid_IP(char *ip_addr)
 int
 NetConfig_Action(int index, ...)
 {
-  char *argv[20];
+  const char *argv[20];
   pid_t pid;
   int status;
 
@@ -2941,7 +2944,7 @@ NetConfig_Action(int index, ...)
     seteuid(0);
     setreuid(0, 0);
 
-    res = execv(command_path, argv);
+    res = execv(command_path, (char* const*) argv);
 
     if (res != 0) {
       DPRINTF(("[SysAPI] fail to call net_config"));
@@ -3194,7 +3197,7 @@ Time_GetNTP_Server(char *server, int no)
 int
 TimeConfig_Action(int index, bool restart ...)
 {
-  char *argv[20];
+  const char *argv[20];
   pid_t pid;
   int status;
 
@@ -3255,7 +3258,7 @@ TimeConfig_Action(int index, bool restar
     }
     snprintf(command_path, sizeof(command_path), "%s/bin/time_config", ts_path);
 
-    res = execv(command_path, argv);
+    res = execv(command_path, (char* const*) argv);
 
     if (res != 0) {
       DPRINTF(("[SysAPI] fail to call time_config"));
@@ -3311,7 +3314,6 @@ Net_SetSMTP_Server(char *server)
 int
 Net_GetSMTP_Server(char *server)
 {
-  server = "inktomi.smtp.com";
   return 0;
 }
 

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/SysAPI.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/SysAPI.h?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/SysAPI.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/SysAPI.h Tue Apr 27 19:12:22 2010
@@ -35,7 +35,7 @@ extern int Net_SetHostname(char *hostnam
 extern int Net_GetDefaultRouter(char *router, size_t len);
 extern int Net_SetDefaultRouter(char *router);
 extern int Net_GetDomain(char *domain, size_t domain_len);
-extern int Net_SetDomain(char *domain);
+extern int Net_SetDomain(const char *domain);
 extern int Net_GetDNS_Servers(char *dns, size_t dns_len);
 extern int Net_SetDNS_Servers(char *dns);
 extern int Net_GetDNS_Server(char *server, size_t server_len, int no);
@@ -53,7 +53,7 @@ extern int Net_SetNIC_BootProtocol(char 
 extern int Net_SetNIC_IP(char *interface, char *nic_ip);
 extern int Net_SetNIC_Netmask(char *interface, char *nic_netmask);
 extern int Net_SetNIC_Gateway(char *interface, char *nic_gateway);
-extern int Net_SetNIC_Up(char *interface, char *onboot, char *protocol, char *ip, char *netmask, char *gateway);
+extern int Net_SetNIC_Up(char *interface, char *onboot, char *protocol, char *ip, char *netmask, const char *gateway);
 extern int Net_IsValid_Interface(char *interface);
 extern int Net_IsValid_Hostname(char *hostname);
 extern int Net_IsValid_IP(char *ip);

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtConverter.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtConverter.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtConverter.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtConverter.cc Tue Apr 27 19:12:22 2010
@@ -67,7 +67,7 @@ int num_file_entries = SIZE(file_info_en
 static InkHashTable *file_info_ht = 0;
 
 // This is for TESTING ONLY!! (used in testConvertFile_ts) 
-char *config_files[] = {
+const char *config_files[] = {
   "admin_access.config",
   "bypass.config",
   "cache.config",
@@ -1343,7 +1343,7 @@ convertDomain_xml(XMLNode * dom_node, IN
 //        xml_file - results of the conversion (allocated buffer) 
 // Output:   
 int
-convertFile_ts(char *filename, char **xml_file)
+convertFile_ts(const char *filename, char **xml_file)
 {
   INKCfgContext ctx = NULL;
   INKCfgEle *ele;
@@ -2252,7 +2252,7 @@ convertPortEle_ts(INKPortEle * ele, text
 // convertIpAddrEle_ts 
 // ---------------------------------------------------------------------
 int
-convertIpAddrEle_ts(INKIpAddrEle * ele, textBuffer * xml_file, char *tag_name)
+convertIpAddrEle_ts(INKIpAddrEle * ele, textBuffer * xml_file, const char *tag_name)
 {
   if (!ele || !xml_file || !tag_name)
     return INK_ERR_FAIL;
@@ -2433,7 +2433,7 @@ convertTimePeriod_ts(INKHmsTime * time, 
 // ---------------------------------------------------------------------
 // converts into ipPortListType with the given "tag_name" 
 int
-convertIpAddrList_ts(INKIpAddrList list, textBuffer * xml_file, char *tag_name)
+convertIpAddrList_ts(INKIpAddrList list, textBuffer * xml_file, const char *tag_name)
 {
   INKIpAddrEle *ele;
 
@@ -2456,7 +2456,7 @@ convertIpAddrList_ts(INKIpAddrList list,
 // ---------------------------------------------------------------------
 // INKDomainList ==> hostPortListType
 int
-convertDomainList_ts(INKDomainList list, textBuffer * xml_file, char *tag_name)
+convertDomainList_ts(INKDomainList list, textBuffer * xml_file, const char *tag_name)
 {
   writeXmlStartTag(xml_file, tag_name);
 
@@ -2487,7 +2487,7 @@ convertDomainList_ts(INKDomainList list,
 // ---------------------------------------------------------------------
 // if namespace specified, writes into xml buffer "<namespace:name>"
 void
-writeXmlStartTag(textBuffer * xml, char *name, char *nsp)
+writeXmlStartTag(textBuffer * xml, const char *name, const char *nsp)
 {
   if (nsp) {
     xml->copyFrom("<", 1);
@@ -2508,7 +2508,7 @@ writeXmlStartTag(textBuffer * xml, char 
 // If namespace specified, writes into xml buffer "<namespace:name "
 // Instead of closing the start tag with close bracket, writes whitespace
 void
-writeXmlAttrStartTag(textBuffer * xml, char *name, char *nsp)
+writeXmlAttrStartTag(textBuffer * xml, const char *name, char *nsp)
 {
   xml->copyFrom("<", 1);
   if (nsp) {
@@ -2525,7 +2525,7 @@ writeXmlAttrStartTag(textBuffer * xml, c
 // ---------------------------------------------------------------------
 // if namespace specified, writes into xml buffer "</namespace:name>"
 void
-writeXmlEndTag(textBuffer * xml, char *name, char *nsp)
+writeXmlEndTag(textBuffer * xml, const char *name, const char *nsp)
 {
 
   xml->copyFrom("</", 2);
@@ -2545,7 +2545,7 @@ writeXmlEndTag(textBuffer * xml, char *n
 // writes into the file "xml": "<elemName>value</elemName>"
 // the nsp is optional 
 void
-writeXmlElement(textBuffer * xml, char *elemName, char *value, char *nsp)
+writeXmlElement(textBuffer * xml, const char *elemName, const char *value, const char *nsp)
 {
   writeXmlStartTag(xml, elemName, nsp);
   xml->copyFrom(value, strlen(value));
@@ -2558,7 +2558,7 @@ writeXmlElement(textBuffer * xml, char *
 // writes into the file "xml": "<elemName>value</elemName>"
 // the nsp is optional 
 void
-writeXmlElement_int(textBuffer * xml, char *elemName, int value, char *nsp)
+writeXmlElement_int(textBuffer * xml, const char *elemName, int value, const char *nsp)
 {
   char tempStr[128];
   memset(tempStr, 0, 128);
@@ -2574,7 +2574,7 @@ writeXmlElement_int(textBuffer * xml, ch
 // ---------------------------------------------------------------------
 // will write the attribute name value pair, padded with white space
 void
-writeXmlAttribute(textBuffer * xml, char *attrName, char *value)
+writeXmlAttribute(textBuffer * xml, const char *attrName, const char *value)
 {
   xml->copyFrom(" ", 1);
   xml->copyFrom(attrName, strlen(attrName));
@@ -2588,7 +2588,7 @@ writeXmlAttribute(textBuffer * xml, char
 // ---------------------------------------------------------------------
 // will write the attribute name value pair, padded with white space
 void
-writeXmlAttribute_int(textBuffer * xml, char *attrName, int value)
+writeXmlAttribute_int(textBuffer * xml, const char *attrName, int value)
 {
   char tempStr[128];
   memset(tempStr, 0, 128);
@@ -2982,7 +2982,8 @@ testConvertFile_xml(XMLNode * file_node,
 int
 testConvertFile_ts(char *file)
 {
-  char *xml_file = NULL, *filename;
+  char *xml_file = NULL;
+  const char *filename;
   // Not used here.
   //INKError err; 
   FILE *fp;                     // output file for conversion results

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtConverter.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtConverter.h?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtConverter.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtConverter.h Tue Apr 27 19:12:22 2010
@@ -38,7 +38,7 @@ typedef char *(*RuleConverter_xml) (XMLN
 
 struct FileInfo
 {
-  char *record_name;
+  const char *record_name;
   INKFileNameT type;
   RuleConverter_ts converter_ts;
   RuleConverter_xml converter_xml;
@@ -87,7 +87,7 @@ int convertDomain_xml(XMLNode * dom_node
 
 
 /* TS ==> XML conversion */
-int convertFile_ts(char *filename, char **xml_file);
+int convertFile_ts(const char *filename, char **xml_file);
 /* RuleConverter function pointers */
 int convertAdminAccessRule_ts(INKCfgEle * cfg_ele, textBuffer * xml_file);
 int convertArmSecurityRule_ts(INKCfgEle * cfg_ele, textBuffer * xml_file);
@@ -113,20 +113,20 @@ int convertVaddrsRule_ts(INKCfgEle * cfg
 
 /* helper functions to convert common structures */
 int convertPortEle_ts(INKPortEle * ele, textBuffer * xml_file, char *tag_name);
-int convertIpAddrEle_ts(INKIpAddrEle * ele, textBuffer * xml_file, char *tag_name);
+int convertIpAddrEle_ts(INKIpAddrEle * ele, textBuffer * xml_file, const char *tag_name);
 int convertPdssFormat_ts(INKPdSsFormat * pdss, textBuffer * xml_file);
 int convertTimePeriod_ts(INKHmsTime * time, textBuffer * xml_file);
-int convertIpAddrList_ts(INKIpAddrList list, textBuffer * xml_file, char *tag_name);
-int convertDomainList_ts(INKDomainList list, textBuffer * xml_file, char *tag_name);
+int convertIpAddrList_ts(INKIpAddrList list, textBuffer * xml_file, const char *tag_name);
+int convertDomainList_ts(INKDomainList list, textBuffer * xml_file, const char *tag_name);
 
 /* helper functions to write common xml */
-void writeXmlStartTag(textBuffer * xml, char *name, char *nsp = NULL);
-void writeXmlAttrStartTag(textBuffer * xml, char *name, char *nsp = NULL);
-void writeXmlEndTag(textBuffer * xml, char *name, char *nsp = NULL);
-void writeXmlElement(textBuffer * xml, char *elemName, char *value, char *nsp = NULL);
-void writeXmlElement_int(textBuffer * xml, char *elemName, int value, char *nsp = NULL);
-void writeXmlAttribute(textBuffer * xml, char *attrName, char *value);
-void writeXmlAttribute_int(textBuffer * xml, char *attrName, int value);
+void writeXmlStartTag(textBuffer * xml, const char *name, const char *nsp = NULL);
+void writeXmlAttrStartTag(textBuffer * xml, const char *name, char *nsp = NULL);
+void writeXmlEndTag(textBuffer * xml, const char *name, const char *nsp = NULL);
+void writeXmlElement(textBuffer * xml, const char *elemName, const char *value, const char *nsp = NULL);
+void writeXmlElement_int(textBuffer * xml, const char *elemName, int value, const char *nsp = NULL);
+void writeXmlAttribute(textBuffer * xml, const char *attrName, const char *value);
+void writeXmlAttribute_int(textBuffer * xml, const char *attrName, int value);
 void writeXmlClose(textBuffer * xml);
 
 int strcmptag(char *fulltag, char *name, char *nsp);

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtHashTable.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtHashTable.h?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtHashTable.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtHashTable.h Tue Apr 27 19:12:22 2010
@@ -42,7 +42,7 @@ class MgmtHashTable
 
 public:
 
-  MgmtHashTable(char *name, bool xfree_on_delete, InkHashTableKeyType type)
+  MgmtHashTable(const char *name, bool xfree_on_delete, InkHashTableKeyType type)
   {
     ink_mutex_init(&mutex, name);
     destroy_and_free = xfree_on_delete;
@@ -70,7 +70,7 @@ public:
     return ret;
   }                             /* End MgmtHashTable::mgmt_hash_table_isbound */
 
-  int mgmt_hash_table_lookup(InkHashTableKey key, InkHashTableValue * value_ptr)
+  int mgmt_hash_table_lookup(const char *key, InkHashTableValue * value_ptr)
   {
     int ret;
     ink_mutex_acquire(&mutex);
@@ -106,7 +106,7 @@ public:
     return ret;
   }                             /* End MgmtHashTable::mgmt_hash_table_get_entry */
 
-  void mgmt_hash_table_insert(InkHashTableKey key, InkHashTableValue value)
+  void mgmt_hash_table_insert(const char *key, InkHashTableValue value)
   {
     ink_mutex_acquire(&mutex);
     ink_hash_table_insert(ht, key, value);

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtServerRPC.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtServerRPC.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtServerRPC.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtServerRPC.cc Tue Apr 27 19:12:22 2010
@@ -172,7 +172,7 @@ Lerror:
 // Output: returns the socket file descriptor to read the RAF response from
 // 
 int
-send_cli_congest_request(char *arguments)
+send_cli_congest_request(const char *arguments)
 {
   int s, connect_result;
   bool found;

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtServerRPC.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtServerRPC.h?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtServerRPC.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtServerRPC.h Tue Apr 27 19:12:22 2010
@@ -38,6 +38,6 @@
 #include "P_RecCore.h"
 
 int send_exit_request(int fd);
-int send_cli_congest_request(char *arguments);
+int send_cli_congest_request(const char *arguments);
 
 #endif /* _MGMT_SERVER_RPC_ */

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtUtils.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtUtils.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtUtils.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtUtils.cc Tue Apr 27 19:12:22 2010
@@ -114,10 +114,10 @@ mgmt_readline(int soc, char *buf, int ma
  *             -1  error
  */
 int
-mgmt_writeline(int soc, char *data, int nbytes)
+mgmt_writeline(int soc, const char *data, int nbytes)
 {
   int nleft, nwritten, n;
-  char *tmp = data;
+  const char *tmp = data;
 
   nleft = nbytes;
   while (nleft > 0) {

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtUtils.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtUtils.h?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtUtils.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtUtils.h Tue Apr 27 19:12:22 2010
@@ -43,7 +43,7 @@
 void mgmt_blockAllSigs();
 
 int mgmt_readline(int fd, char *buf, int maxlen);
-int mgmt_writeline(int fd, char *data, int nbytes);
+int mgmt_writeline(int fd, const char *data, int nbytes);
 
 #if !defined(_WIN32)
 int mgmt_read_pipe(int fd, char *buf, int bytes_to_read);

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.cc?rev=938607&r1=938606&r2=938607&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.cc Tue Apr 27 19:12:22 2010
@@ -1571,7 +1571,7 @@ fileCheckSum(char *buffer, int size, cha
 //  Attempts to spawn out a process by given a list of arguments
 //
 int
-processSpawn(char *args[],
+processSpawn(const char *args[],
              EnvBlock * env,
              textBuffer * input_buf, textBuffer * output_buf, bool nowait, bool run_as_root, bool * truncated)
 {
@@ -1585,7 +1585,7 @@ processSpawn(char *args[],
   pid_t pid;
   long total;
   bool cutoff;
-  char *too_large_msg = "\nfile too large, truncated here...";
+  const char *too_large_msg = "\nfile too large, truncated here...";
   uid_t saved_euid = 0;
 
   if (pipe(stdinPipe) == -1)
@@ -1630,9 +1630,9 @@ processSpawn(char *args[],
     }
     // exec process
     if (env) {
-      pid = execve(args[0], &args[0], env->toStringArray());
+      pid = execve(args[0], (char* const*)&args[0], env->toStringArray());
     } else {
-      pid = execv(args[0], &args[0]);
+      pid = execv(args[0], (char* const*)&args[0]);
     }
     if (pid == -1) {
       mgmt_elog(stderr, "[processSpawn] unable to execve [%s...]\n", args[0]);



Mime
View raw message