trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iga...@apache.org
Subject svn commit: r1058814 - in /trafficserver/traffic/trunk: example/null-transform/null-transform.c proxy/Initialize.cc
Date Fri, 14 Jan 2011 00:28:47 GMT
Author: igalic
Date: Fri Jan 14 00:28:47 2011
New Revision: 1058814

URL: http://svn.apache.org/viewvc?rev=1058814&view=rev
Log:
Removing dead, #if 0ed code.

Modified:
    trafficserver/traffic/trunk/example/null-transform/null-transform.c
    trafficserver/traffic/trunk/proxy/Initialize.cc

Modified: trafficserver/traffic/trunk/example/null-transform/null-transform.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/null-transform/null-transform.c?rev=1058814&r1=1058813&r2=1058814&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/null-transform/null-transform.c (original)
+++ trafficserver/traffic/trunk/example/null-transform/null-transform.c Fri Jan 14 00:28:47
2011
@@ -171,11 +171,6 @@ handle_transform(TSCont contp)
         TSError("[null-plugin] unable to copy IO buffers\n");
         goto Lerror;
       }
-      /* For testing bad 64-bit */
-#if 0
-      printf("wrote %d\n", (int)towrite);
-      sleep(1);
-#endif
 
       /* Tell the read buffer that we have read the data and are no
        * longer interested in it.

Modified: trafficserver/traffic/trunk/proxy/Initialize.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Initialize.cc?rev=1058814&r1=1058813&r2=1058814&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Initialize.cc (original)
+++ trafficserver/traffic/trunk/proxy/Initialize.cc Fri Jan 14 00:28:47 2011
@@ -97,54 +97,6 @@ init_system_settings(void)
 #endif
 }
 
-#if 0
-// XXX: This is unused function
-//      Either remove it or implement Layout functions
-void
-init_system_dirs(void)
-{
-  struct stat s;
-  int err;
-
-  if ((err = stat(system_config_directory, &s)) < 0) {
-    // Try 'system_root_dir/etc/trafficserver' directory
-    snprintf(system_config_directory, sizeof(system_config_directory),
-             "%s%s%s%s%s",system_root_dir, DIR_SEP,"etc",DIR_SEP,"trafficserver");
-    if ((err = stat(system_config_directory, &s)) < 0) {
-      fprintf(stderr,"unable to stat() config dir '%s': %d %d, %s\n",
-              system_config_directory, err, errno, strerror(errno));
-      fprintf(stderr, "please set config path via 'proxy.config.config_dir' \n");
-      _exit(1);
-    }
-  }
-
-  if ((err = stat(system_runtime_dir, &s)) < 0) {
-    // Try 'system_root_dir/var/trafficserver' directory
-    snprintf(system_runtime_dir, sizeof(system_runtime_dir),
-             "%s%s%s%s%s",system_root_dir, DIR_SEP,"var",DIR_SEP,"trafficserver");
-    if ((err = stat(system_runtime_dir, &s)) < 0) {
-      fprintf(stderr,"unable to stat() local state dir '%s': %d %d, %s\n",
-              system_runtime_dir, err, errno, strerror(errno));
-      fprintf(stderr,"please set 'proxy.config.local_state_dir'\n");
-      _exit(1);
-    }
-  }
-
-  if ((err = stat(system_log_dir, &s)) < 0) {
-    // Try 'system_root_dir/var/log/trafficserver' directory
-    snprintf(system_log_dir, sizeof(system_log_dir), "%s%s%s%s%s%s%s",
-             system_root_dir, DIR_SEP,"var",DIR_SEP,"log",DIR_SEP,"trafficserver");
-    if ((err = stat(system_log_dir, &s)) < 0) {
-      fprintf(stderr,"unable to stat() log dir'%s': %d %d, %s\n",
-              system_log_dir, err, errno, strerror(errno));
-      fprintf(stderr,"please set 'proxy.config.log.logfile_dir'\n");
-      _exit(1);
-    }
-  }
-
-}
-#endif
-
 #if defined(linux)
 #include <sys/prctl.h>
 #endif
@@ -370,138 +322,3 @@ init_system_diags(char *bdt, char *bat)
   init_system_reconfigure_diags();
 }
 
-
-#if 0 // TODO: remove after api/dir re-org
-
-#define DEFAULT_REMOTE_MANAGEMENT_FLAG    0
-#define DEFAULT_SYSTEM_CONFIG_DIRECTORY   "etc/trafficserver"
-#define DEFAULT_MANAGEMENT_DIRECTORY      "etc/trafficserver"
-
-char error_tags[1024] = "";
-char action_tags[1024] = "";
-int  diags_init = 0;
-
-//int command_flag = 0;
-int num_of_net_threads = ink_number_of_processors();
-//int num_of_cache_threads = 1;
-
-int remote_management_flag = DEFAULT_REMOTE_MANAGEMENT_FLAG;
-char management_directory[256] = DEFAULT_MANAGEMENT_DIRECTORY;
-char system_config_directory[PATH_NAME_MAX + 1] = DEFAULT_SYSTEM_CONFIG_DIRECTORY;
-
-Diags *diags;
-DiagsConfig *diagsConfig;
-
-AppVersionInfo appVersionInfo;
-
-static void initialize_process_manager();
-
-void
-initialize_standalone()
-{
-  init_system();
-
-  // Define the version info
-  appVersionInfo.setup(PACKAGE_NAME,"traffic_server", PACKAGE_VERSION, __DATE__,
-                        __TIME__, BUILD_MACHINE, BUILD_PERSON, "");
-  // Local process manager
-  initialize_process_manager();
-
-  diagsConfig = NEW(new DiagsConfig(error_tags, action_tags));
-  diags = diagsConfig->diags;
-  diags_init = 1;
-  eventProcessor.start(num_of_net_threads);
-
-  // Set up IO Buffers
-  int config_max_iobuffer_size = DEFAULT_MAX_BUFFER_SIZE;
-  ReadConfigInteger(config_max_iobuffer_size,
-                    "proxy.config.io.max_buffer_size");
-  max_iobuffer_size = iobuffer_size_to_index(config_max_iobuffer_size,
-                                           DEFAULT_BUFFER_SIZES - 1);
-  if (default_small_iobuffer_size > max_iobuffer_size)
-    default_small_iobuffer_size = max_iobuffer_size;
-  if (default_large_iobuffer_size > max_iobuffer_size)
-    default_large_iobuffer_size = max_iobuffer_size;
-
-  init_buffer_allocators();
-
-  netProcessor.start();
-
-  return;
-}
-
-//
-// Startup process manager
-//
-void initialize_process_manager()
-{
-  ProcessRecords *precs;
-  struct stat s;
-  int err;
-
-  mgmt_use_syslog();
-
-  // Temporary Hack to Enable Communuication with LocalManager
-  if (getenv("PROXY_REMOTE_MGMT")) {
-    remote_management_flag = true;
-  }
-  //
-  // Remove excess '/'
-  //
-  if (management_directory[strlen(management_directory) - 1] == '/')
-    management_directory[strlen(management_directory) - 1] = 0;
-
-  if ((err = stat(management_directory, &s)) < 0) {
-    // Try 'system_root_dir/etc/trafficserver' directory
-    snprintf(management_directory, sizeof(management_directory),
-             "%s%s%s%s%s",system_root_dir, DIR_SEP,"etc",DIR_SEP,"trafficserver");
-    if ((err = stat(management_directory, &s)) < 0) {
-      fprintf(stderr,"unable to stat() management path '%s': %d %d, %s\n",
-                management_directory, err, errno, strerror(errno));
-      fprintf(stderr,"please set management path via command line '-d <managment directory>'\n");
-      _exit(1);
-    }
-  }
-
-  RecProcessInit(remote_management_flag ? RECM_CLIENT : RECM_STAND_ALONE, diags);
-
-  if (!remote_management_flag) {
-    LibRecordsConfigInit();
-  }
-  //
-  // Start up manager
-  //
-  precs = NEW(new ProcessRecords(management_directory, "records.config", 0));
-
-  pmgmt = NEW(new ProcessManager(remote_management_flag, management_directory, precs));
-
-  pmgmt->start();
-
-  RecProcessInitMessage(remote_management_flag ? RECM_CLIENT : RECM_STAND_ALONE);
-
-  pmgmt->reconfigure();
-
-  init_system_dirs();// setup directories
-
-  //
-  // Define version info records
-  //
-  RecRegisterStatString(RECT_PROCESS, "proxy.process.version.server.short", appVersionInfo.VersionStr,
RECP_NULL);
-  RecRegisterStatString(RECT_PROCESS,
-                        "proxy.process.version.server.long", appVersionInfo.FullVersionInfoStr,
RECP_NULL);
-  RecRegisterStatString(RECT_PROCESS, "proxy.process.version.server.build_number", appVersionInfo.BldNumStr,
RECP_NULL);
-  RecRegisterStatString(RECT_PROCESS, "proxy.process.version.server.build_time", appVersionInfo.BldTimeStr,
RECP_NULL);
-  RecRegisterStatString(RECT_PROCESS, "proxy.process.version.server.build_date", appVersionInfo.BldDateStr,
RECP_NULL);
-  RecRegisterStatString(RECT_PROCESS,
-                        "proxy.process.version.server.build_machine", appVersionInfo.BldMachineStr,
RECP_NULL);
-  RecRegisterStatString(RECT_PROCESS,
-                        "proxy.process.version.server.build_person", appVersionInfo.BldPersonStr,
RECP_NULL);
-  //    RecRegisterStatString(RECT_PROCESS,
-  //             "proxy.process.version.server.build_compile_flags",
-  //                 appVersionInfo.BldCompileFlagsStr,
-  //             RECP_NULL);
-}
-
-#endif
-
-



Mime
View raw message