summaryrefslogtreecommitdiff
path: root/source3/smbd/smb2_server.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-04-22 23:52:19 -0700
committerJeremy Allison <jra@samba.org>2010-04-22 23:52:19 -0700
commit8f67f873ace91964da066c421986e260aceba75b (patch)
tree21776965085b9926a28ff5ed41ef147176668386 /source3/smbd/smb2_server.c
parent9cd712d1bc1ac5140597e86b5c634d2c820d86de (diff)
downloadsamba-8f67f873ace91964da066c421986e260aceba75b.tar.gz
samba-8f67f873ace91964da066c421986e260aceba75b.tar.bz2
samba-8f67f873ace91964da066c421986e260aceba75b.zip
Make deferred opens (NT_STATUS_SHARING_VIOLATION) work over SMB2.
Makes SMB2Create call re-entrant internally. Now this infrastructure is in place, oplocks will follow shortly. Tested with Win7 client and with W2K8R2. Jeremy.
Diffstat (limited to 'source3/smbd/smb2_server.c')
-rw-r--r--source3/smbd/smb2_server.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 277a79ff06..c838954836 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -173,7 +173,12 @@ static struct smbd_smb2_request *smbd_smb2_request_allocate(TALLOC_CTX *mem_ctx)
struct smbd_smb2_request **parent;
struct smbd_smb2_request *req;
+#if 0
+ /* Enable this to find subtle valgrind errors. */
+ mem_pool = talloc_init("smbd_smb2_request_allocate");
+#else
mem_pool = talloc_pool(mem_ctx, 8192);
+#endif
if (mem_pool == NULL) {
return NULL;
}
@@ -936,7 +941,7 @@ static NTSTATUS smbd_smb2_request_process_cancel(struct smbd_smb2_request *req)
return NT_STATUS_OK;
}
-static NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
+NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
{
const uint8_t *inhdr;
int i = req->current_idx;
@@ -1164,10 +1169,6 @@ static NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
return smbd_smb2_request_error(req, NT_STATUS_INVALID_PARAMETER);
}
-static void smbd_smb2_request_dispatch_compound(struct tevent_context *ctx,
- struct tevent_immediate *im,
- void *private_data);
-
static NTSTATUS smbd_smb2_request_reply(struct smbd_smb2_request *req)
{
struct tevent_req *subreq;
@@ -1203,7 +1204,7 @@ static NTSTATUS smbd_smb2_request_reply(struct smbd_smb2_request *req)
}
tevent_schedule_immediate(im,
req->sconn->smb2.event_ctx,
- smbd_smb2_request_dispatch_compound,
+ smbd_smb2_request_dispatch_immediate,
req);
return NT_STATUS_OK;
}
@@ -1227,7 +1228,7 @@ static NTSTATUS smbd_smb2_request_reply(struct smbd_smb2_request *req)
return NT_STATUS_OK;
}
-static void smbd_smb2_request_dispatch_compound(struct tevent_context *ctx,
+void smbd_smb2_request_dispatch_immediate(struct tevent_context *ctx,
struct tevent_immediate *im,
void *private_data)
{
@@ -1239,7 +1240,7 @@ static void smbd_smb2_request_dispatch_compound(struct tevent_context *ctx,
TALLOC_FREE(im);
if (DEBUGLEVEL >= 10) {
- DEBUG(10,("smbd_smb2_request_dispatch_compound: idx[%d] of %d vectors\n",
+ DEBUG(10,("smbd_smb2_request_dispatch_immediate: idx[%d] of %d vectors\n",
req->current_idx, req->in.vector_count));
print_req_vectors(req);
}