projects
/
l2tpns.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2483656
)
typo
author
Brendan O'Dea
<bod@optus.net>
Wed, 15 Dec 2004 02:56:38 +0000
(
02:56
+0000)
committer
Brendan O'Dea
<bod@optus.net>
Wed, 15 Dec 2004 02:56:38 +0000
(
02:56
+0000)
cluster.c
patch
|
blob
|
history
diff --git
a/cluster.c
b/cluster.c
index
dd5d9c2
..
dc62252
100644
(file)
--- a/
cluster.c
+++ b/
cluster.c
@@
-1,6
+1,6
@@
// L2TPNS Clustering Stuff
// L2TPNS Clustering Stuff
-char const *cvs_id_cluster = "$Id: cluster.c,v 1.2
3 2004-12-15 01:04:34
bodea Exp $";
+char const *cvs_id_cluster = "$Id: cluster.c,v 1.2
4 2004-12-15 02:56:38
bodea Exp $";
#include <stdio.h>
#include <sys/file.h>
#include <stdio.h>
#include <sys/file.h>
@@
-1149,19
+1149,20
@@
static int cluster_process_heartbeat(u8 * data, int size, int more, u8 * p, u32
kill(0, SIGTERM);
exit(1);
kill(0, SIGTERM);
exit(1);
- } else if (h->table_version < config->cluster_table_version) {
- return -1;
}
}
+ if (h->table_version < config->cluster_table_version)
+ return -1;
}
if (basetime > h->basetime) {
LOG(0, 0, 0, "They're an older master than me so I'm gone!\n");
kill(0, SIGTERM);
exit(1);
}
if (basetime > h->basetime) {
LOG(0, 0, 0, "They're an older master than me so I'm gone!\n");
kill(0, SIGTERM);
exit(1);
- } else if (basetime < h->basetime)
- return -1;
}
}
+ if (basetime < h->basetime)
+ return -1;
+
if (my_address < addr) { // Tie breaker.
LOG(0, 0, 0, "They're a higher IP address than me, so I'm gone!\n");
kill(0, SIGTERM);
if (my_address < addr) { // Tie breaker.
LOG(0, 0, 0, "They're a higher IP address than me, so I'm gone!\n");
kill(0, SIGTERM);