summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-01-25 21:31:40 +0100
committerVolker Lendecke <vl@samba.org>2008-02-02 11:03:21 +0100
commit9f6e983d0b67b64daf27dab130348d3491bad4ac (patch)
tree182d604e37eb3103f99996eeab3f1fa2fa615d30 /source3/smbd
parent0afbfa4284db8204a3696f4fea6cff96965e6074 (diff)
downloadsamba-9f6e983d0b67b64daf27dab130348d3491bad4ac.tar.gz
samba-9f6e983d0b67b64daf27dab130348d3491bad4ac.tar.bz2
samba-9f6e983d0b67b64daf27dab130348d3491bad4ac.zip
Convert read_smb_length to return NTSTATUS
(This used to be commit 5750c3a51b4ddac635a98195d1621b24f91bad3f)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/reply.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 18376031ec..46c14d158e 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -3492,18 +3492,12 @@ void reply_writebraw(struct smb_request *req)
}
/* Now read the raw data into the buffer and write it */
- if (read_smb_length(smbd_server_fd(),buf,
- SMB_SECONDARY_WAIT, get_srv_read_error()) == -1) {
+ status = read_smb_length(smbd_server_fd(), buf, SMB_SECONDARY_WAIT,
+ &numtowrite);
+ if (!NT_STATUS_IS_OK(status)) {
exit_server_cleanly("secondary writebraw failed");
}
- /*
- * Even though this is not an smb message,
- * smb_len returns the generic length of a packet.
- */
-
- numtowrite = smb_len(buf);
-
/* Set up outbuf to return the correct size */
reply_outbuf(req, 1, 0);