diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-11-09 11:47:33 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-11-15 17:14:13 +0100 |
commit | 693cb77b2fdb96205ab83bb2c22b67fe91de61b0 (patch) | |
tree | c450abd9297afe0abfa63d05224fee88f97157dd /source3/smbd/smb2_create.c | |
parent | 10b285ccc29b106f164a6c18116e237634867717 (diff) | |
download | samba-693cb77b2fdb96205ab83bb2c22b67fe91de61b0.tar.gz samba-693cb77b2fdb96205ab83bb2c22b67fe91de61b0.tar.bz2 samba-693cb77b2fdb96205ab83bb2c22b67fe91de61b0.zip |
s3:smb2_server: always send STATUS_PENDING responses, but delayed by 0.5 milliseconds
In future we'll pass the delay from the caller.
metze
Diffstat (limited to 'source3/smbd/smb2_create.c')
-rw-r--r-- | source3/smbd/smb2_create.c | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index 29696dcdb4..eee252ba36 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -437,7 +437,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx, } - if (!smb2req->async) { + if (smb2req->subreq == NULL) { /* New create call. */ req = tevent_req_create(mem_ctx, &state, struct smbd_smb2_create_state); @@ -445,7 +445,6 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx, return NULL; } state->smb2req = smb2req; - smb2req->subreq = req; /* So we can find this when going async. */ smb1req = smbd_smb2_fake_smb_request(smb2req); if (tevent_req_nomem(smb1req, req)) { @@ -892,7 +891,7 @@ bool get_deferred_open_message_state_smb2(struct smbd_smb2_request *smb2req, if (!smb2req) { return false; } - if (!smb2req->async) { + if (smb2req->subreq == NULL) { return false; } req = smb2req->subreq; @@ -1201,35 +1200,6 @@ bool push_deferred_open_message_smb2(struct smbd_smb2_request *smb2req, return false; } -#if 1 - /* Boo - turns out this isn't what W2K8R2 - does. It actually sends the STATUS_PENDING - message followed by the STATUS_SHARING_VIOLATION - message. Surely this means that all open - calls (even on directories) will potentially - fail in a chain.... ? And I've seen directory - opens as the start of a chain. JRA. - - Update: 19th May 2010. Talking with Microsoft - engineers at the plugfest this is a bug in - Windows. Re-enable this code. - */ - /* - * More subtlety. To match W2K8R2 don't - * send a "gone async" message if it's simply - * a STATUS_SHARING_VIOLATION (short) wait, not - * an oplock break wait. We do this by prematurely - * setting smb2req->async flag. - */ - if (timeout.tv_sec < 2) { - DEBUG(10,("push_deferred_open_message_smb2: " - "short timer wait (usec = %u). " - "Don't send async message.\n", - (unsigned int)timeout.tv_usec )); - smb2req->async = true; - } -#endif - /* Re-schedule us to retry on timer expiry. */ end_time = timeval_sum(&request_time, &timeout); |