summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-06-12 11:01:27 +0200
committerVolker Lendecke <vl@samba.org>2010-06-12 11:59:21 +0200
commitd7bc5fe7346e4f6c3f04be96618046879666a127 (patch)
tree75e96f3ba3cd369715c637b84e8fd9622a1c7deb /source3
parentedfc7eaf6ddd0e08c6a8544230c42f50ed45d9aa (diff)
downloadsamba-d7bc5fe7346e4f6c3f04be96618046879666a127.tar.gz
samba-d7bc5fe7346e4f6c3f04be96618046879666a127.tar.bz2
samba-d7bc5fe7346e4f6c3f04be96618046879666a127.zip
s3: Pass sconn to init_smb_request()
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/process.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index ad6859b5fc..443914de70 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -440,11 +440,12 @@ static NTSTATUS receive_smb_talloc(TALLOC_CTX *mem_ctx, int fd,
* Initialize a struct smb_request from an inbuf
*/
-static bool init_smb_request(struct smb_request *req, const uint8 *inbuf,
+static bool init_smb_request(struct smb_request *req,
+ struct smbd_server_connection *sconn,
+ const uint8 *inbuf,
size_t unread_bytes, bool encrypted,
uint32_t seqnum)
{
- struct smbd_server_connection *sconn = smbd_server_conn;
size_t req_size = smb_len(inbuf) + 4;
/* Ensure we have at least smb_size bytes. */
if (req_size < smb_size) {
@@ -1562,8 +1563,8 @@ static void construct_reply(char *inbuf, int size, size_t unread_bytes,
smb_panic("could not allocate smb_request");
}
- if (!init_smb_request(req, (uint8 *)inbuf, unread_bytes, encrypted,
- seqnum)) {
+ if (!init_smb_request(req, smbd_server_conn, (uint8 *)inbuf,
+ unread_bytes, encrypted, seqnum)) {
exit_server_cleanly("Invalid SMB request");
}
@@ -2586,7 +2587,8 @@ static bool smbd_echo_reply(int fd,
return false;
}
- if (!init_smb_request(&req, inbuf, 0, false, seqnum)) {
+ if (!init_smb_request(&req, smbd_server_conn, inbuf, 0, false,
+ seqnum)) {
return false;
}
req.inbuf = inbuf;