ubik: clones should not request votes
[openafs.git] / src / ubik / vote.c
index ce44b62..ba4ff5a 100644 (file)
@@ -112,6 +112,10 @@ uvote_ShouldIRun(void)
     afs_int32 now;
     int code = 1; /* default to yes */
 
+    if (amIClone) {
+       return 0;               /* if we cannot be the sync-site, do not ask for votes */
+    }
+
     UBIK_VOTE_LOCK;
     now = FT_ApproxTime();
     if (BIGTIME + vote_globals.ubik_lastYesTime < now)
@@ -595,7 +599,6 @@ uvote_Init(void)
     vote_globals.ubik_lastYesTime = FT_ApproxTime();
 
     /* Initialize globals */
-    vote_globals.ubik_lastYesTime = 0;
     vote_globals.lastYesHost = 0xffffffff;
     vote_globals.lastYesClaim = 0;
     vote_globals.lastYesState = 0;