summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-06-11 10:40:42 +0200
committerMichael Adam <obnox@samba.org>2014-08-06 09:51:12 +0200
commitb87ec64cf6c0c43456c4f1092cbbedb90ecaa490 (patch)
tree82904c259e2c46dc61be934f6f0bf9153f2a6f30
parent95bd792860a581faf2d1f32e70726cae8c82d492 (diff)
downloadsamba-b87ec64cf6c0c43456c4f1092cbbedb90ecaa490.tar.gz
samba-b87ec64cf6c0c43456c4f1092cbbedb90ecaa490.tar.xz
samba-b87ec64cf6c0c43456c4f1092cbbedb90ecaa490.zip
s3:smbd: pass smbXsrv_connection to process_smb()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
-rw-r--r--source3/smbd/process.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index c1685da3f5..e49e3576cc 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -47,6 +47,7 @@ struct pending_message_list {
struct pending_message_list *next, *prev;
struct timeval request_time; /* When was this first issued? */
struct smbd_server_connection *sconn;
+ struct smbXsrv_connection *xconn;
struct tevent_timer *te;
struct smb_perfcount_data pcd;
uint32_t seqnum;
@@ -659,7 +660,7 @@ static bool init_smb_request(struct smb_request *req,
return true;
}
-static void process_smb(struct smbd_server_connection *conn,
+static void process_smb(struct smbXsrv_connection *xconn,
uint8_t *inbuf, size_t nread, size_t unread_bytes,
uint32_t seqnum, bool encrypted,
struct smb_perfcount_data *deferred_pcd);
@@ -672,6 +673,7 @@ static void smbd_deferred_open_timer(struct tevent_context *ev,
struct pending_message_list *msg = talloc_get_type(private_data,
struct pending_message_list);
struct smbd_server_connection *sconn = msg->sconn;
+ struct smbXsrv_connection *xconn = msg->xconn;
TALLOC_CTX *mem_ctx = talloc_tos();
uint64_t mid = (uint64_t)SVAL(msg->buf.data,smb_mid);
uint8_t *inbuf;
@@ -692,7 +694,7 @@ static void smbd_deferred_open_timer(struct tevent_context *ev,
* re-processed in error. */
msg->processed = true;
- process_smb(sconn, inbuf,
+ process_smb(xconn, inbuf,
msg->buf.length, 0,
msg->seqnum, msg->encrypted, &msg->pcd);
@@ -723,6 +725,7 @@ static bool push_queued_message(struct smb_request *req,
return False;
}
msg->sconn = req->sconn;
+ msg->xconn = req->xconn;
msg->buf = data_blob_talloc(msg, req->inbuf, msg_len);
if(msg->buf.data == NULL) {
@@ -1848,11 +1851,12 @@ error:
/****************************************************************************
Process an smb from the client
****************************************************************************/
-static void process_smb(struct smbd_server_connection *sconn,
+static void process_smb(struct smbXsrv_connection *xconn,
uint8_t *inbuf, size_t nread, size_t unread_bytes,
uint32_t seqnum, bool encrypted,
struct smb_perfcount_data *deferred_pcd)
{
+ struct smbd_server_connection *sconn = xconn->sconn;
int msg_type = CVAL(inbuf,0);
DO_PROFILE_INC(smb_count);
@@ -2504,7 +2508,7 @@ static void smbd_server_connection_read_handler(
}
process:
- process_smb(sconn, inbuf, inbuf_len, unread_bytes,
+ process_smb(xconn, inbuf, inbuf_len, unread_bytes,
seqnum, encrypted, NULL);
}