smb_FreeNCB(ncbp);
}
-void smb_MapNTError(long code, unsigned long *NTStatusp)
+void smb_MapNTError(long code, unsigned long *NTStatusp, afs_uint32 redir)
{
unsigned long NTStatus;
NTStatus = 0xC0000034L; /* Name not found */
}
else if (code == CM_ERROR_TIMEDOUT) {
+ if (redir)
+ NTStatus = 0xC0020052L; /* RPC_NT_COMM_FAILURE */
+ else {
#ifdef COMMENT
- NTStatus = 0xC00000CFL; /* Sharing Paused */
-
- /* Do not send Timeout to the SMB redirector.
- * It causes the redirector to drop the connection */
- NTStatus = 0x00000102L; /* Timeout */
- /* 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 */
+ NTStatus = 0xC00000CFL; /* Sharing Paused */
+
+ /* Do not send Timeout to the SMB redirector.
+ * It causes the redirector to drop the connection */
+ NTStatus = 0x00000102L; /* Timeout */
+ /* 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 */
+ NTStatus = 0xC00000B5L; /* I/O Timeout */
#endif
+ }
}
else if (code == CM_ERROR_RETRY) {
+ if (redir)
+ NTStatus = 0xC000022DL; /* Retry */
+ else {
#ifdef COMMENT
NTStatus = 0xC000022DL; /* Retry */
#else
NTStatus = 0xC00000B5L; /* I/O Timeout */
#endif
}
+ }
else if (code == CM_ERROR_NOACCESS) {
NTStatus = 0xC0000022L; /* Access denied */
}
*/
if (code) {
if (vcp->flags & SMB_VCFLAG_STATUS32) {
- smb_MapNTError(code, &NTStatus);
+ smb_MapNTError(code, &NTStatus, FALSE);
outWctp = outp->wctp;
smbp = (smb_t *) &outp->data;
if (code != CM_ERROR_PARTIALWRITE
if (vcp->flags & SMB_VCFLAG_STATUS32) {
unsigned long NTStatus;
- smb_MapNTError(code, &NTStatus);
+ smb_MapNTError(code, &NTStatus, FALSE);
outWctp = outp->wctp;
smbp = (smb_t *) &outp->data;
*outWctp++ = 0;
unsigned long NTStatus;
if (vcp->flags & SMB_VCFLAG_STATUS32)
- smb_MapNTError(code, &NTStatus);
+ smb_MapNTError(code, &NTStatus, FALSE);
else
smb_MapCoreError(code, vcp, &errCode, &errClass);
if (vcp->flags & SMB_VCFLAG_STATUS32) {
unsigned long NTStatus;
- smb_MapNTError(t2p->error_code, &NTStatus);
+ smb_MapNTError(t2p->error_code, &NTStatus, FALSE);
smbp->rcls = (unsigned char) (NTStatus & 0xff);
smbp->reh = (unsigned char) ((NTStatus >> 8) & 0xff);