1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00

s3:smb2_server: remember smbXsrv_connection for each smbd_smb2_request

This prepares the structures for multi-channel support.
Each request needs to respond on the same connection,
where it arrived.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Stefan Metzmacher 2014-06-10 13:34:55 +02:00 committed by Michael Adam
parent b38cb03ab6
commit 39f5566092
2 changed files with 5 additions and 2 deletions

View File

@ -624,6 +624,7 @@ struct smbd_smb2_request {
struct smbd_smb2_request *prev, *next;
struct smbd_server_connection *sconn;
struct smbXsrv_connection *xconn;
struct smbd_smb2_send_queue queue_entry;

View File

@ -553,6 +553,7 @@ static NTSTATUS smbd_smb2_request_create(struct smbd_server_connection *sconn,
return NT_STATUS_NO_MEMORY;
}
req->sconn = sconn;
req->xconn = xconn;
talloc_steal(req, inbuf);
@ -1152,18 +1153,18 @@ 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(xconn);
newreq = smbd_smb2_request_allocate(req->xconn);
if (!newreq) {
return NULL;
}
newreq->sconn = req->sconn;
newreq->xconn = req->xconn;
newreq->session = req->session;
newreq->do_encryption = req->do_encryption;
newreq->do_signing = req->do_signing;
@ -3000,6 +3001,7 @@ static NTSTATUS smbd_smb2_request_next_incoming(struct smbd_server_connection *s
return NT_STATUS_NO_MEMORY;
}
state->req->sconn = sconn;
state->req->xconn = xconn;
state->min_recv_size = lp_min_receive_file_size();
TEVENT_FD_READABLE(xconn->transport.fde);