*/
goto out;
}
- afs_ServerDown(sa, acode);
+ afs_ServerDown(sa, acode, rxconn);
ForceNewConnections(sa); /* multi homed clients lock:afs_xsrvAddr? */
if (aerrP)
(aerrP->err_Server)++;
}
/* check for ubik errors; treat them like crashed servers */
else if (acode >= ERROR_TABLE_BASE_U && acode < ERROR_TABLE_BASE_U + 255) {
- afs_ServerDown(sa, acode);
+ afs_ServerDown(sa, acode, rxconn);
if (aerrP)
(aerrP->err_Server)++;
shouldRetry = 1; /* retryable (maybe one is working) */
* retry in case there is another server. However, if we find
* no connection (aconn == 0) we set the networkError flag.
*/
- afs_ServerDown(sa, acode);
+ afs_ServerDown(sa, acode, rxconn);
if (aerrP)
(aerrP->err_Server)++;
VSleep(1); /* Just a hack for desperate times. */
extern void afs_GetCapabilities(struct server *ts);
extern void ForceAllNewConnections(void);
extern void afs_MarkServerUpOrDown(struct srvAddr *sa, int a_isDown);
-extern afs_int32 afs_ServerDown(struct srvAddr *sa, int code);
+extern afs_int32 afs_ServerDown(struct srvAddr *sa, int code,
+ struct rx_connection *rxconn);
extern void afs_CountServers(void);
extern void afs_CheckServers(int adown, struct cell *acellp);
extern void afs_LoopServers(int adown, struct cell *acellp, int vlalso,
#endif
extern char *afs_strdup(char *s);
extern void print_internet_address(char *preamble, struct srvAddr *sa,
- char *postamble, int flag, int code);
+ char *postamble, int flag, int code,
+ struct rx_connection *rxconn);
extern afs_int32 afs_data_pointer_to_int32(const void *p);
extern void afs_CheckLocks(void);
afs_int32
-afs_ServerDown(struct srvAddr *sa, int code)
+afs_ServerDown(struct srvAddr *sa, int code, struct rx_connection *rxconn)
{
struct server *aserver = sa->server;
return 0;
afs_MarkServerUpOrDown(sa, SRVR_ISDOWN);
if (sa->sa_portal == aserver->cell->vlport)
- print_internet_address
- ("afs: Lost contact with volume location server ", sa, "", 1, code);
+ print_internet_address("afs: Lost contact with volume location server ",
+ sa, "", 1, code, rxconn);
else
print_internet_address("afs: Lost contact with file server ", sa, "",
- 1, code);
+ 1, code, rxconn);
return 1;
} /*ServerDown */
code = VL_ProbeServer(rxconn);
RX_AFS_GLOCK();
rx_SetConnDeadTime(rxconn, afs_rx_deadtime);
- afs_PutConn(tc, rxconn, SHARED_LOCK);
/*
* If probe worked, or probe call not yet defined (for compatibility
* with old vlsevers), then we treat this server as running again
if (tc->parent->srvr == sa) {
afs_MarkServerUpOrDown(sa, 0);
print_internet_address("afs: volume location server ", sa,
- " is back up", 2, code);
+ " is back up", 2, code, rxconn);
}
}
+ afs_PutConn(tc, rxconn, SHARED_LOCK);
} /*CheckVLServer */
}
static void
-CkSrv_MarkUpDown(struct afs_conn **conns, int nconns, afs_int32 *results)
+CkSrv_MarkUpDown(struct afs_conn **conns, struct rx_connection **rxconns,
+ int nconns, afs_int32 *results)
{
struct srvAddr *sa;
struct afs_conn *tc;
(tc->parent->srvr == sa)) {
/* server back up */
print_internet_address("afs: file server ", sa, " is back up", 2,
- results[i]);
+ results[i], rxconns[i]);
ObtainWriteLock(&afs_xserver, 244);
ObtainWriteLock(&afs_xsrvAddr, 245);
} else {
if (results[i] < 0) {
/* server crashed */
- afs_ServerDown(sa, results[i]);
+ afs_ServerDown(sa, results[i], rxconns[i]);
ForceNewConnections(sa); /* multi homed clients */
}
}
caps[i].Capabilities_len = 0;
}
}
- CkSrv_MarkUpDown(conns, nconns, results);
+ CkSrv_MarkUpDown(conns, rxconns, nconns, results);
afs_osi_Free(caps, nconns * sizeof(Capabilities));
afs_osi_Free(results, nconns * sizeof(afs_int32));
ObtainWriteLock(&afs_xserver, 723);
/* we forced a conn above; important we mark it down if needed */
if ((code < 0) && (code != RXGEN_OPCODE)) {
- afs_ServerDown(tc->parent->srvr, code);
+ afs_ServerDown(tc->parent->srvr, code, rxconn);
ForceNewConnections(tc->parent->srvr); /* multi homed clients */
}
afs_PutConn(tc, rxconn, SHARED_LOCK);