windows-hard-and-idle-dead-timeouts-20090511

LICENSE MIT

Fix conditional test that assigns value to idleDeadTimeout

Modify event log message to indicate timeout could be either a
hard or an idle timeout.

As described in the source comments, do not retry on a hard or
idle timeout.
This commit is contained in:
Jeffrey Altman 2009-05-11 15:15:35 +00:00
parent 5520747790
commit f5a97a145e
2 changed files with 16 additions and 16 deletions

View File

@ -163,7 +163,7 @@ Severity=Warning
Facility=System
SymbolicName=MSG_RX_HARD_DEAD_TIME_EXCEEDED
Language=English
Hard Dead Time exceeded when communicating with server %1
Hard or Idle Dead Time exceeded when communicating with server %1
.
MessageId=

View File

@ -107,7 +107,7 @@ void cm_InitConn(void)
HardDeadtimeout = (unsigned short) RDRtimeout;
afsi_log("HardDeadTimeout is %d", HardDeadtimeout);
}
if (ConnDeadtimeout == 0) {
if (IdleDeadtimeout == 0) {
IdleDeadtimeout = (unsigned short) RDRtimeout;
afsi_log("IdleDeadTimeout is %d", IdleDeadtimeout);
}
@ -604,28 +604,28 @@ cm_Analyze(cm_conn_t *connp, cm_user_t *userp, cm_req_t *reqp,
/* RX codes */
else if (errorCode == RX_CALL_TIMEOUT) {
/* server took longer than hardDeadTime
/* RPC took longer than hardDeadTime or the server
* reported idle for longer than idleDeadTime
* don't mark server as down but don't retry
* this is to prevent the SMB session from timing out
* In addition, we log an event to the event log
*/
if (serverp) {
/* Log server being offline for this volume */
sprintf(addr, "%d.%d.%d.%d",
((serverp->addr.sin_addr.s_addr & 0xff)),
((serverp->addr.sin_addr.s_addr & 0xff00)>> 8),
((serverp->addr.sin_addr.s_addr & 0xff0000)>> 16),
((serverp->addr.sin_addr.s_addr & 0xff000000)>> 24));
/* Log server being offline for this volume */
sprintf(addr, "%d.%d.%d.%d",
((serverp->addr.sin_addr.s_addr & 0xff)),
((serverp->addr.sin_addr.s_addr & 0xff00)>> 8),
((serverp->addr.sin_addr.s_addr & 0xff0000)>> 16),
((serverp->addr.sin_addr.s_addr & 0xff000000)>> 24));
LogEvent(EVENTLOG_WARNING_TYPE, MSG_RX_HARD_DEAD_TIME_EXCEEDED, addr);
LogEvent(EVENTLOG_WARNING_TYPE, MSG_RX_HARD_DEAD_TIME_EXCEEDED, addr);
osi_Log1(afsd_logp, "cm_Analyze: hardDeadTime exceeded addr[%s]",
osi_LogSaveString(afsd_logp,addr));
reqp->tokenIdleErrorServp = serverp;
reqp->idleError++;
retry = 1;
}
osi_Log1(afsd_logp, "cm_Analyze: hardDeadTime or idleDeadtime exceeded addr[%s]",
osi_LogSaveString(afsd_logp,addr));
reqp->tokenIdleErrorServp = serverp;
reqp->idleError++;
}
}
else if (errorCode >= -64 && errorCode < 0) {
/* mark server as down */