diff options
author | Volker Lendecke <vl@samba.org> | 2008-11-03 21:55:05 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-11-04 20:52:06 +0100 |
commit | b8125663d90d9748b71a25a06a357167958dd18e (patch) | |
tree | 52144bf1e71acf4d77f81cdb66c3878bc984d714 /source3/smbd/process.c | |
parent | e4897a5376309bd73727f4130bf9bc6170158a6f (diff) | |
download | samba-b8125663d90d9748b71a25a06a357167958dd18e.tar.gz samba-b8125663d90d9748b71a25a06a357167958dd18e.tar.bz2 samba-b8125663d90d9748b71a25a06a357167958dd18e.zip |
Make "inbuf" a talloc child of "smb_request" for normal smb requests
This is necessary if we want to keep the whole smb_request for deferred ops.
The explicit settings of req->inbuf will be removed once all those deferring
operations are converted to store the whole request and not just the inbuf.
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r-- | source3/smbd/process.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 1dcfb4b122..958e8634e9 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -400,7 +400,6 @@ void init_smb_request(struct smb_request *req, (unsigned int)req_size)); exit_server_cleanly("Invalid SMB request"); } - req->inbuf = inbuf; req->outbuf = NULL; } @@ -1497,6 +1496,7 @@ static void construct_reply(char *inbuf, int size, size_t unread_bytes, bool enc smb_panic("could not allocate smb_request"); } init_smb_request(req, (uint8 *)inbuf, unread_bytes, encrypted); + req->inbuf = (uint8_t *)talloc_move(req, &inbuf); conn = switch_message(req->cmd, req, size); @@ -1723,6 +1723,7 @@ void chain_reply(struct smb_request *req) smb_panic("could not allocate smb_request"); } init_smb_request(req2, (uint8 *)inbuf2,0, req->encrypted); + req2->inbuf = (uint8_t *)inbuf2; req2->chain_fsp = req->chain_fsp; /* process the request */ @@ -1931,8 +1932,6 @@ void smbd_process(void) process_smb(inbuf, inbuf_len, unread_bytes, encrypted); - TALLOC_FREE(inbuf); - num_smbs++; /* The timeout_processing function isn't run nearly |