cluster: master - cman: Move token timeout into header file
Lon Hohberger
lon at fedoraproject.org
Tue Oct 13 16:27:07 UTC 2009
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=f3eaf86591ef2fd9f2bede06f4277b10614ea508
Commit: f3eaf86591ef2fd9f2bede06f4277b10614ea508
Parent: a9ef89ce68381955d35288eb329d249e37b31618
Author: Lon Hohberger <lhh at redhat.com>
AuthorDate: Tue Oct 13 12:21:44 2009 -0400
Committer: Lon Hohberger <lhh at redhat.com>
CommitterDate: Tue Oct 13 12:25:37 2009 -0400
cman: Move token timeout into header file
Signed-off-by: Lon Hohberger <lhh at redhat.com>
---
cman/config/cman-preconfig.c | 3 ++-
cman/config/cman.h | 1 +
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/cman/config/cman-preconfig.c b/cman/config/cman-preconfig.c
index 1ba48ae..b22f359 100644
--- a/cman/config/cman-preconfig.c
+++ b/cman/config/cman-preconfig.c
@@ -710,8 +710,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/config/cman.h b/cman/config/cman.h
index ba0843d..8e04d21 100644
--- a/cman/config/cman.h
+++ b/cman/config/cman.h
@@ -9,6 +9,7 @@
#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
More information about the cluster-commits
mailing list