summaryrefslogtreecommitdiffstats
path: root/source3/smbd/smb2_server.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-06-10 13:34:55 +0200
committerMichael Adam <obnox@samba.org>2014-08-06 09:51:11 +0200
commitb38cb03ab6e6c550cc7d1f525a8b56a62974b0fd (patch)
treeacdcecae09bf15d680cd3b797bbb04bcfb2a6fe5 /source3/smbd/smb2_server.c
parent92e96bedfb29101c1b0df6aed174b5ecf2b6001d (diff)
downloadsamba-b38cb03ab6e6c550cc7d1f525a8b56a62974b0fd.tar.gz
samba-b38cb03ab6e6c550cc7d1f525a8b56a62974b0fd.tar.xz
samba-b38cb03ab6e6c550cc7d1f525a8b56a62974b0fd.zip
s3:smb2_server: talloc smbd_smb2_request as child of smbXsrv_connection
As the list of pending requests moved from sconn->smb2.requests to xconn->smb2.requests, it is more logical to use smbXsrv_connection as talloc parent. This prepares the structures for multi-channel support. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/smbd/smb2_server.c')
-rw-r--r--source3/smbd/smb2_server.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index b963b949b0..16c6fd4134 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -511,6 +511,7 @@ static NTSTATUS smbd_smb2_request_create(struct smbd_server_connection *sconn,
uint8_t *inbuf, size_t size,
struct smbd_smb2_request **_req)
{
+ struct smbXsrv_connection *xconn = sconn->conn;
struct smbd_smb2_request *req;
uint32_t protocol_version;
const uint8_t *inhdr = NULL;
@@ -547,7 +548,7 @@ static NTSTATUS smbd_smb2_request_create(struct smbd_server_connection *sconn,
return NT_STATUS_INVALID_PARAMETER;
}
- req = smbd_smb2_request_allocate(sconn);
+ req = smbd_smb2_request_allocate(xconn);
if (req == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -1151,12 +1152,13 @@ static bool dup_smb2_vec4(TALLOC_CTX *ctx,
static struct smbd_smb2_request *dup_smb2_req(const struct smbd_smb2_request *req)
{
+ struct smbXsrv_connection *xconn = req->sconn->conn;
struct smbd_smb2_request *newreq = NULL;
struct iovec *outvec = NULL;
int count = req->out.vector_count;
int i;
- newreq = smbd_smb2_request_allocate(req->sconn);
+ newreq = smbd_smb2_request_allocate(xconn);
if (!newreq) {
return NULL;
}
@@ -2993,7 +2995,7 @@ static NTSTATUS smbd_smb2_request_next_incoming(struct smbd_server_connection *s
/* ask for the next request */
ZERO_STRUCTP(state);
- state->req = smbd_smb2_request_allocate(sconn);
+ state->req = smbd_smb2_request_allocate(xconn);
if (state->req == NULL) {
return NT_STATUS_NO_MEMORY;
}