trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject svn commit: r1058355 - in /trafficserver/traffic/trunk/proxy/mgmt2/cop: Makefile.am TrafficCop.cc
Date Wed, 12 Jan 2011 23:48:07 GMT
Author: zwoop
Date: Wed Jan 12 23:48:07 2011
New Revision: 1058355

URL: http://svn.apache.org/viewvc?rev=1058355&view=rev
Log:
TS-491 Fixes to make it compile properly

Modified:
    trafficserver/traffic/trunk/proxy/mgmt2/cop/Makefile.am
    trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc

Modified: trafficserver/traffic/trunk/proxy/mgmt2/cop/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cop/Makefile.am?rev=1058355&r1=1058354&r2=1058355&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cop/Makefile.am (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cop/Makefile.am Wed Jan 12 23:48:07 2011
@@ -18,7 +18,11 @@
 #  limitations under the License.
 
 AM_CPPFLAGS = $(iocore_include_dirs) \
-  -I$(top_srcdir)/proxy/mgmt2/cli
+  -I$(top_srcdir)/lib/records \
+  -I$(top_srcdir)/proxy/mgmt2 \
+  -I$(top_srcdir)/proxy/mgmt2/utils \
+  -I$(top_srcdir)/proxy/mgmt2/cli \
+  -I$(top_srcdir)/proxy/mgmt2/cluster
 
 MGMT_DEFS = @MGMT_DEFS@
 DEFS += $(MGMT_DEFS)

Modified: trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc?rev=1058355&r1=1058354&r2=1058355&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc Wed Jan 12 23:48:07 2011
@@ -25,6 +25,7 @@
 #include "I_Layout.h"
 #include "I_Version.h"
 #include "clientCLI.h"
+#include "ClusterCom.h"
 
 #if defined(linux)
 #include "sys/utsname.h"
@@ -33,15 +34,6 @@
 #include <sys/ipc.h>
 #include <sys/sem.h>
 
-// From ClusterCom.h
-enum MgmtClusterType
-{
-  CLUSTER_INVALID = 0,
-  FULL_CLUSTER,
-  MGMT_CLUSTER,
-  NO_CLUSTER
-};
-
 union semun
 {
   int val;                      /* value for SETVAL */
@@ -97,7 +89,7 @@ static char bin_path[PATH_MAX];
 
 static int autoconf_port = 8083;
 static int rs_port = 8088;
-static int cluster_type = NO_CLUSTER;
+static MgmtClusterType cluster_type = NO_CLUSTER;
 static int http_backdoor_port = 8084;
 static char http_backdoor_ip[PATH_MAX];
 
@@ -626,6 +618,7 @@ read_config()
   static time_t last_mod = 0;
   char log_dir[PATH_MAX];
   char log_filename[PATH_MAX];
+  int tmp_int;
 
 #ifdef TRACE_LOG_COP
   cop_log(COP_DEBUG, "Entering read_config()\n");
@@ -679,9 +672,11 @@ read_config()
   read_config_int("proxy.config.process_manager.mgmt_port", &http_backdoor_port);
   read_config_int("proxy.config.admin.autoconf_port", &autoconf_port);
   read_config_int("proxy.config.cluster.rsport", &rs_port);
-  read_config_int("proxy.local.cluster.type", &cluster_type);
   read_config_int("proxy.config.lm.sem_id", &sem_id);
 
+  read_config_int("proxy.local.cluster.type", &tmp_int);
+  cluster_type = static_cast<MgmtClusterType>(tmp_int);
+
   // If TS is going to bind to incoming_ip_to_bind, we need to make
   // sure we connect to it when heartbeating TS on the http_backdoor
   // port.  Also, we need to make sure we bind our outgoing TS



Mime
View raw message