summaryrefslogtreecommitdiff
path: root/source3/smbd/reply.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r--source3/smbd/reply.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index d7b3a0fab1..eb4106b0c1 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -2706,8 +2706,10 @@ int reply_read_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt
}
nread = send_file_readX(conn, inbuf, outbuf, length, bufsize, fsp, startpos, smb_maxcnt);
- if (nread != -1)
+ /* Only call chain_reply if not an error. */
+ if (nread != -1 && SVAL(outbuf,smb_rcls) == 0) {
nread = chain_reply(inbuf,outbuf,length,bufsize);
+ }
END_PROFILE(SMBreadX);
return nread;