summaryrefslogtreecommitdiff
path: root/source4/ntvfs/common
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-04 11:28:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:28 -0500
commitc870ae8b898d3bcc81ed9fd1afd505d78dea52cc (patch)
tree6e83b98a6c0a1ce2ac594f9f84ad539ee436a9d7 /source4/ntvfs/common
parent92cac50045398b2d45ac45dd0d53eed3c41d4d00 (diff)
downloadsamba-c870ae8b898d3bcc81ed9fd1afd505d78dea52cc.tar.gz
samba-c870ae8b898d3bcc81ed9fd1afd505d78dea52cc.tar.bz2
samba-c870ae8b898d3bcc81ed9fd1afd505d78dea52cc.zip
r3528: added support for the SMBntcancel() operation, which cancels any
outstanding async operation (triggering an immediate timeout). pvfs now passes the RAW-MUX test (This used to be commit 3423e2f41461d054067ef168b9b986f62cc8f77c)
Diffstat (limited to 'source4/ntvfs/common')
-rw-r--r--source4/ntvfs/common/brlock.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source4/ntvfs/common/brlock.c b/source4/ntvfs/common/brlock.c
index 6fae7c6e4c..2b30270eff 100644
--- a/source4/ntvfs/common/brlock.c
+++ b/source4/ntvfs/common/brlock.c
@@ -63,7 +63,7 @@ struct brl_context {
servid_t server;
uint16_t tid;
struct messaging_context *messaging_ctx;
- struct lock_struct last_lock_failure;
+ struct lock_struct last_lock;
};
@@ -95,7 +95,7 @@ struct brl_context *brl_init(TALLOC_CTX *mem_ctx, servid_t server, uint16_t tid,
brl->server = server;
brl->tid = tid;
brl->messaging_ctx = messaging_ctx;
- ZERO_STRUCT(brl->last_lock_failure);
+ ZERO_STRUCT(brl->last_lock);
return brl;
}
@@ -194,13 +194,14 @@ static BOOL brl_conflict_other(struct lock_struct *lck1, struct lock_struct *lck
*/
static NTSTATUS brl_lock_failed(struct brl_context *brl, struct lock_struct *lock)
{
- if (brl_same_context(&lock->context, &brl->last_lock_failure.context) &&
- lock->fnum == brl->last_lock_failure.fnum &&
- lock->start == brl->last_lock_failure.start &&
- lock->size == brl->last_lock_failure.size) {
+ if (lock->context.server == brl->last_lock.context.server &&
+ lock->context.tid == brl->last_lock.context.tid &&
+ lock->fnum == brl->last_lock.fnum &&
+ lock->start == brl->last_lock.start &&
+ lock->size == brl->last_lock.size) {
return NT_STATUS_FILE_LOCK_CONFLICT;
}
- brl->last_lock_failure = *lock;
+ brl->last_lock = *lock;
if (lock->start >= 0xEF000000 &&
(lock->start >> 63) == 0) {
/* amazing the little things you learn with a test