diff options
author | Volker Lendecke <vl@samba.org> | 2008-11-03 20:16:09 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-11-04 20:52:06 +0100 |
commit | e4897a5376309bd73727f4130bf9bc6170158a6f (patch) | |
tree | 89f9d751f2c4c2124759fc57c450eb987a0da5ad /source3 | |
parent | d62ff20cd5cc64a524d401ffba1fe6b3e7e8cc31 (diff) | |
download | samba-e4897a5376309bd73727f4130bf9bc6170158a6f.tar.gz samba-e4897a5376309bd73727f4130bf9bc6170158a6f.tar.bz2 samba-e4897a5376309bd73727f4130bf9bc6170158a6f.zip |
Add construct_reply_common_req wrapper
The goal is to remove the remaining direct calls to construct_reply_common.
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 1 | ||||
-rw-r--r-- | source3/smbd/aio.c | 2 | ||||
-rw-r--r-- | source3/smbd/process.c | 5 | ||||
-rw-r--r-- | source3/smbd/reply.c | 4 |
4 files changed, 9 insertions, 3 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 0d4404b339..be811dfd70 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -8232,6 +8232,7 @@ const char *smb_fn_name(int type); void add_to_common_flags2(uint32 v); void remove_from_common_flags2(uint32 v); void construct_reply_common(const char *inbuf, char *outbuf); +void construct_reply_common_req(struct smb_request *req, char *outbuf); void chain_reply(struct smb_request *req); void check_reload(time_t t); void smbd_process(void); diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c index b59b372771..7e27c27b5a 100644 --- a/source3/smbd/aio.c +++ b/source3/smbd/aio.c @@ -250,7 +250,7 @@ bool schedule_aio_read_and_X(connection_struct *conn, return False; } - construct_reply_common((char *)req->inbuf, aio_ex->outbuf); + construct_reply_common_req(req, aio_ex->outbuf); srv_set_message(aio_ex->outbuf, 12, 0, True); SCVAL(aio_ex->outbuf,smb_vwv0,0xFF); /* Never a chained reply. */ diff --git a/source3/smbd/process.c b/source3/smbd/process.c index bd0acbc3c6..1dcfb4b122 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -1608,6 +1608,11 @@ void construct_reply_common(const char *inbuf, char *outbuf) SSVAL(outbuf,smb_mid,SVAL(inbuf,smb_mid)); } +void construct_reply_common_req(struct smb_request *req, char *outbuf) +{ + return construct_reply_common((char *)req->inbuf, outbuf); +} + /**************************************************************************** Construct a chained reply and add it to the already made reply ****************************************************************************/ diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 7b5ed8feb4..377ba4e530 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -3129,7 +3129,7 @@ static void send_file_readX(connection_struct *conn, struct smb_request *req, header = data_blob_const(headerbuf, sizeof(headerbuf)); - construct_reply_common((char *)req->inbuf, (char *)headerbuf); + construct_reply_common_req(req, (char *)headerbuf); setup_readX_header((char *)headerbuf, smb_maxcnt); if ((nread = SMB_VFS_SENDFILE(smbd_server_fd(), fsp, &header, startpos, smb_maxcnt)) == -1) { @@ -3181,7 +3181,7 @@ normal_read: if ((smb_maxcnt & 0xFF0000) > 0x10000) { uint8 headerbuf[smb_size + 2*12]; - construct_reply_common((char *)req->inbuf, (char *)headerbuf); + construct_reply_common_req(req, (char *)headerbuf); setup_readX_header((char *)headerbuf, smb_maxcnt); /* Send out the header. */ |