summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-05-20 19:48:47 +0200
committerStefan Metzmacher <metze@samba.org>2009-05-20 20:53:32 +0200
commitf9da4fb71a4d93278025e009b8987a4ba0965fa1 (patch)
treebac1344a44844018bc4ef4518977e64dc53ab882 /source3
parenteac12355196cbf15d8bc51109a12c65efc34ffde (diff)
downloadsamba-f9da4fb71a4d93278025e009b8987a4ba0965fa1.tar.gz
samba-f9da4fb71a4d93278025e009b8987a4ba0965fa1.tar.bz2
samba-f9da4fb71a4d93278025e009b8987a4ba0965fa1.zip
s3:smbd: move the callback functions of smbd_smb2_request_reply() closer itself
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/smb2_server.c84
1 files changed, 42 insertions, 42 deletions
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index c4c5492e5f..68c812b37f 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -394,6 +394,48 @@ static NTSTATUS smbd_smb2_request_reply(struct smbd_smb2_request *req)
return NT_STATUS_OK;
}
+static void smbd_smb2_request_dispatch_compound(struct tevent_req *subreq)
+{
+ struct smbd_smb2_request *req = tevent_req_callback_data(subreq,
+ struct smbd_smb2_request);
+ struct smbd_server_connection *conn = req->conn;
+ NTSTATUS status;
+
+ tevent_wakeup_recv(subreq);
+ TALLOC_FREE(subreq);
+
+ DEBUG(10,("smbd_smb2_request_dispatch_compound: idx[%d] of %d vectors\n",
+ req->current_idx, req->in.vector_count));
+
+ status = smbd_smb2_request_dispatch(req);
+ if (!NT_STATUS_IS_OK(status)) {
+ smbd_server_connection_terminate(conn, nt_errstr(status));
+ return;
+ }
+}
+
+static void smbd_smb2_request_writev_done(struct tevent_req *subreq)
+{
+ struct smbd_smb2_request *req = tevent_req_callback_data(subreq,
+ struct smbd_smb2_request);
+ struct smbd_server_connection *conn = req->conn;
+ int ret;
+ int sys_errno;
+ TALLOC_CTX *mem_pool;
+
+ ret = tstream_writev_queue_recv(subreq, &sys_errno);
+ TALLOC_FREE(subreq);
+ if (ret == -1) {
+ NTSTATUS status = map_nt_error_from_unix(sys_errno);
+ smbd_server_connection_terminate(conn, nt_errstr(status));
+ return;
+ }
+
+ mem_pool = req->mem_pool;
+ req = NULL;
+ talloc_free(mem_pool);
+}
+
NTSTATUS smbd_smb2_request_error_ex(struct smbd_smb2_request *req,
NTSTATUS status,
DATA_BLOB *info)
@@ -506,48 +548,6 @@ NTSTATUS smbd_smb2_request_done(struct smbd_smb2_request *req,
return smbd_smb2_request_done_ex(req, NT_STATUS_OK, body, dyn);
}
-static void smbd_smb2_request_dispatch_compound(struct tevent_req *subreq)
-{
- struct smbd_smb2_request *req = tevent_req_callback_data(subreq,
- struct smbd_smb2_request);
- struct smbd_server_connection *conn = req->conn;
- NTSTATUS status;
-
- tevent_wakeup_recv(subreq);
- TALLOC_FREE(subreq);
-
- DEBUG(10,("smbd_smb2_request_dispatch_compound: idx[%d] of %d vectors\n",
- req->current_idx, req->in.vector_count));
-
- status = smbd_smb2_request_dispatch(req);
- if (!NT_STATUS_IS_OK(status)) {
- smbd_server_connection_terminate(conn, nt_errstr(status));
- return;
- }
-}
-
-static void smbd_smb2_request_writev_done(struct tevent_req *subreq)
-{
- struct smbd_smb2_request *req = tevent_req_callback_data(subreq,
- struct smbd_smb2_request);
- struct smbd_server_connection *conn = req->conn;
- int ret;
- int sys_errno;
- TALLOC_CTX *mem_pool;
-
- ret = tstream_writev_queue_recv(subreq, &sys_errno);
- TALLOC_FREE(subreq);
- if (ret == -1) {
- NTSTATUS status = map_nt_error_from_unix(sys_errno);
- smbd_server_connection_terminate(conn, nt_errstr(status));
- return;
- }
-
- mem_pool = req->mem_pool;
- req = NULL;
- talloc_free(mem_pool);
-}
-
struct smbd_smb2_request_read_state {
size_t missing;
bool asked_for_header;