You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by mt...@apache.org on 2010/05/20 10:59:22 UTC
svn commit: r946570 -
/trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.cc
Author: mturk
Date: Thu May 20 08:59:22 2010
New Revision: 946570
URL: http://svn.apache.org/viewvc?rev=946570&view=rev
Log:
TS-359: Remove DIR_SEP usage. This code needs a review
Modified:
trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.cc
Modified: trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.cc?rev=946570&r1=946569&r2=946570&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.cc Thu May 20 08:59:22 2010
@@ -363,7 +363,7 @@ receive_fd(0)
found = false;
init = false;
- if (!(strlen(host) < 1024)) {
+ if (strlen(host) >= 1024) {
mgmt_fatal(stderr, "[ClusterCom::ClusterCom] Hostname too large: %s\n", host);
}
// the constructor does a memset() on broadcast_addr and receive_addr, initializing them
@@ -403,8 +403,14 @@ receive_fd(0)
if (!found || strlen(p) + strlen(cluster_file) >= 1024) {
mgmt_fatal(stderr, "[ClusterCom::ClusterCom] path + filename too large\n");
}
-
- snprintf(cluster_conf, sizeof(cluster_conf), "%s%s%s", p, DIR_SEP, cluster_file);
+ // XXX: This allows to have absolute config cluster_configuration directive.
+ // If that file must be inside config directory (p) use
+ // ink_filepath_make
+ ink_filepath_merge(cluster_conf, sizeof(cluster_conf), p, cluster_file, INK_FILEPATH_TRUENAME);
+ // XXX: Shouldn't we pass the cluster_conf to the Rollback ???
+ //
+ Debug("ccom", "[ClusterCom::ClusterCom] Using cluster file: %s", cluster_file);
+ Debug("ccom", "[ClusterCom::ClusterCom] Using cluster conf: %s", cluster_conf);
cluster_file_rb = new Rollback(cluster_file, false);
xfree(cluster_file);