Skip to contentSkip to conversation

cman: Move token timeout into header file

PATCH In review Lon Hohberger 1 participant 2 messages Oct 13, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cman: Move token timeout into header file

---
 cman/daemon/cman-preconfig.c |    3 ++-
 cman/daemon/cman.h           |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)
cman/daemon/cman-preconfig.c +2 -1
index b39ca4c..4bd3d95 100644
@@ -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",
cman/daemon/cman.h +1 -0
index 67f76d3..dfcf014 100644
@@ -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
Signature · 1 line
1.6.2.5