[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [PATCH] cman: Move token timeout into header file



Signed-off-by: Lon Hohberger <lhh redhat com>
---
 cman/daemon/cman-preconfig.c |    3 ++-
 cman/daemon/cman.h           |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/cman/daemon/cman-preconfig.c b/cman/daemon/cman-preconfig.c
index b39ca4c..4bd3d95 100644
--- a/cman/daemon/cman-preconfig.c
+++ b/cman/daemon/cman-preconfig.c
@@ -690,8 +690,9 @@ static void add_cman_overrides(struct objdb_iface_ver0 *objdb)
 		/* Set the token timeout is 10 seconds, but don't overrride anything that
 		   might be in cluster.conf */
 		if (objdb_get_string(objdb, object_handle, "token", &value)) {
+			snprintf(tmp, sizeof(tmp), "%d", DEFAULT_TOKEN_TIMEOUT);
 			objdb->object_key_create(object_handle, "token", strlen("token"),
-						 "10000", strlen("10000")+1);
+						 tmp, strlen(tmp)+1);
 		}
 		if (objdb_get_string(objdb, object_handle, "token_retransmits_before_loss_const", &value)) {
 			objdb->object_key_create(object_handle, "token_retransmits_before_loss_const",
diff --git a/cman/daemon/cman.h b/cman/daemon/cman.h
index 67f76d3..dfcf014 100644
--- a/cman/daemon/cman.h
+++ b/cman/daemon/cman.h
@@ -11,6 +11,7 @@ extern int our_nodeid(void);
 #define DEFAULT_PORT            5405
 #define DEFAULT_CLUSTER_NAME    "RHCluster"
 #define DEFAULT_MAX_QUEUED       128
+#define DEFAULT_TOKEN_TIMEOUT    10000
 #define DEFAULT_QUORUMDEV_POLL   10000
 #define DEFAULT_SHUTDOWN_TIMEOUT 5000
 #define DEFAULT_CCSD_POLL        1000
-- 
1.6.2.5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]