}
static int
-amSyncSite(void) {
+amSyncSite(void)
+{
afs_int32 now;
afs_int32 rcode;
tt.tv_sec = temp;
tt.tv_usec = 0;
#ifdef AFS_PTHREAD_ENV
- code = select(0, 0, 0, 0, &tt);
+ select(0, 0, 0, 0, &tt);
#else
- code = IOMGR_Select(0, 0, 0, 0, &tt);
+ IOMGR_Select(0, 0, 0, 0, &tt);
#endif
- } else
- code = 0;
+ }
lastWakeupTime = FT_ApproxTime(); /* started a new collection phase */
(int)code, afs_inet_ntoa_r(ts->addr[0], hoststr));
code = -1;
}
+ if (code > 0 && rx_ConnError(connections[multi_i])) {
+ ubik_print("assuming vote from %s is invalid due to conn error %d; marking host down\n",
+ afs_inet_ntoa_r(ts->addr[0], hoststr),
+ (int)rx_ConnError(connections[multi_i]));
+ code = -1;
+ }
/* note that the vote time (the return code) represents the time
* the vote was computed, *not* the time the vote expires. We compute
}
if (count <= 0) { /* no address found */
- ubik_print("ubik: No network addresses found, aborting..");
+ ubik_print("ubik: No network addresses found, aborting..\n");
return UBADHOST;
}
*ame = myAddr[0];
tcount = rx_getAllAddr(myAddr2, UBIK_MAX_INTERFACE_ADDR);
if (tcount <= 0) { /* no address found */
- ubik_print("ubik: No network addresses found, aborting..");
+ ubik_print("ubik: No network addresses found, aborting..\n");
return UBADHOST;
}
UBIK_ADDR_UNLOCK;
} else if (multi_error == UBADHOST) {
code = UBADHOST; /* remote CellServDB inconsistency */
- ubik_print("Inconsistent Cell Info on server: ");
+ ubik_print("Inconsistent Cell Info on server:\n");
UBIK_ADDR_LOCK;
for (j = 0; j < UBIK_MAX_INTERFACE_ADDR && ts->addr[j]; j++)
- ubik_print("%s ", afs_inet_ntoa_r(ts->addr[j], hoststr));
+ ubik_print("... %s\n", afs_inet_ntoa_r(ts->addr[j], hoststr));
UBIK_ADDR_UNLOCK;
- ubik_print("\n");
} else {
UBIK_BEACON_LOCK;
ts->up = 0; /* mark the remote server as down */