From: Jeffrey Altman Date: Sat, 31 Oct 2009 14:33:00 +0000 (-0400) Subject: Windows: Use STATUS_IO_TIMEOUT where STATUS_TIMEOUT was returned X-Git-Tag: openafs-devel-1_5_67~52 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=1594cf98926ceef1de36010335f9ca19cc050bad;p=packages%2Fo%2Fopenafs.git Windows: Use STATUS_IO_TIMEOUT where STATUS_TIMEOUT was returned STATUS_TIMEOUT causes the smb redirector to drop the connection. STATUS_RETRY is interpreted by the smb redirector as if the error was generated by the transport stack and not the smb server. STATUS_IO_TIMEOUT is listed in the SNIA CIFS 1.0 spec as a valid return code for the smb server. Lets us that. LICENSE MIT Change-Id: I842a78cde3d975c88bbeb64294dd53cc8b101047 Reviewed-on: http://gerrit.openafs.org/831 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/smb.c b/src/WINNT/afsd/smb.c index 21dd0e3be..48c206349 100644 --- a/src/WINNT/afsd/smb.c +++ b/src/WINNT/afsd/smb.c @@ -3011,12 +3011,20 @@ void smb_MapNTError(long code, unsigned long *NTStatusp) /* Do not send Timeout to the SMB redirector. * It causes the redirector to drop the connection */ NTStatus = 0x00000102L; /* Timeout */ -#else + /* do not send Retry to the SMB redirector. + * It believes the error comes from the transport + * layer not from the SMB server. */ NTStatus = 0xC000022DL; /* Retry */ +#else + NTStatus = 0xC00000B5L; /* I/O Timeout */ #endif } else if (code == CM_ERROR_RETRY) { +#ifdef COMMENT NTStatus = 0xC000022DL; /* Retry */ +#else + NTStatus = 0xC00000B5L; /* I/O Timeout */ +#endif } else if (code == CM_ERROR_NOACCESS) { NTStatus = 0xC0000022L; /* Access denied */ @@ -3139,7 +3147,11 @@ void smb_MapNTError(long code, unsigned long *NTStatusp) NTStatus = 0xC0000257L; /* Path Not Covered */ } else if (code == CM_ERROR_ALLBUSY) { +#ifdef COMMENT NTStatus = 0xC000022DL; /* Retry */ +#else + NTStatus = 0xC00000B5L; /* I/O Timeout */ +#endif } else if (code == CM_ERROR_ALLOFFLINE || code == CM_ERROR_ALLDOWN) { NTStatus = 0xC000003AL; /* Path not found */