X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fcifs%2Ftransport.c;h=f8871196098c9abe371a64a1df5d269cb407f503;hb=d04ae27bae42bcce1b3fa70ca2edf25d92b1cf39;hp=981ea0d8b9cdaa4b06f53f7fdae975b41a1bffa6;hpb=1047abc159b4eb4ba4a7342a0969e16e9d4b4c69;p=linux-2.6 diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 981ea0d8b9..f887119609 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -515,6 +515,7 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, *pbytes_returned = in_buf->smb_buf_length; /* BB special case reconnect tid and uid here? */ + /* BB special case Errbadpassword and pwdexpired here */ rc = map_smb_to_linux_error(in_buf); /* convert ByteCount if necessary */ @@ -522,7 +523,7 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, sizeof (struct smb_hdr) - 4 /* do not count RFC1001 header */ + (2 * in_buf->WordCount) + 2 /* bcc */ ) - BCC(in_buf) = le16_to_cpu(BCC(in_buf)); + BCC(in_buf) = le16_to_cpu(BCC_LE(in_buf)); } else { rc = -EIO; cFYI(1,("Bad MID state?")); @@ -786,7 +787,7 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, sizeof (struct smb_hdr) - 4 /* do not count RFC1001 header */ + (2 * out_buf->WordCount) + 2 /* bcc */ ) - BCC(out_buf) = le16_to_cpu(BCC(out_buf)); + BCC(out_buf) = le16_to_cpu(BCC_LE(out_buf)); } else { rc = -EIO; cERROR(1,("Bad MID state? "));