diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-03-30 13:56:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:59:24 -0500 |
commit | 96b5dd789be8468ca73665dc47da3779aaefe609 (patch) | |
tree | 591b618a58e55e23d15ddc5e564744e121a67eb4 /source4/ntvfs/common | |
parent | 90de5b96a9040f8878b21a579482ee0e7ba0f92f (diff) | |
download | samba-96b5dd789be8468ca73665dc47da3779aaefe609.tar.gz samba-96b5dd789be8468ca73665dc47da3779aaefe609.tar.bz2 samba-96b5dd789be8468ca73665dc47da3779aaefe609.zip |
r14822: if we use the snum used by the lp_* functions instead of the wire TID,
then don't use tid as name...
metze
(This used to be commit d41d48caf209fec9f5f04d38d75277b1cfeed22f)
Diffstat (limited to 'source4/ntvfs/common')
-rw-r--r-- | source4/ntvfs/common/brlock.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source4/ntvfs/common/brlock.c b/source4/ntvfs/common/brlock.c index ddbab257bc..bc9d8b1288 100644 --- a/source4/ntvfs/common/brlock.c +++ b/source4/ntvfs/common/brlock.c @@ -48,7 +48,7 @@ struct lock_context { uint32_t server; uint16_t smbpid; - uint16_t tid; + int snum; }; /* The data in brlock records is an unsorted linear array of these @@ -66,7 +66,7 @@ struct lock_struct { struct brl_context { struct tdb_wrap *w; uint32_t server; - uint16_t tid; + int snum; struct messaging_context *messaging_ctx; struct lock_struct last_lock; }; @@ -77,7 +77,7 @@ struct brl_context { talloc_free(). We need the messaging_ctx to allow for pending lock notifications. */ -struct brl_context *brl_init(TALLOC_CTX *mem_ctx, uint32_t server, uint16_t tid, +struct brl_context *brl_init(TALLOC_CTX *mem_ctx, uint32_t server, int snum, struct messaging_context *messaging_ctx) { char *path; @@ -98,7 +98,7 @@ struct brl_context *brl_init(TALLOC_CTX *mem_ctx, uint32_t server, uint16_t tid, } brl->server = server; - brl->tid = tid; + brl->snum = snum; brl->messaging_ctx = messaging_ctx; ZERO_STRUCT(brl->last_lock); @@ -113,7 +113,7 @@ static BOOL brl_same_context(struct lock_context *ctx1, struct lock_context *ctx { return (ctx1->server == ctx2->server && ctx1->smbpid == ctx2->smbpid && - ctx1->tid == ctx2->tid); + ctx1->snum == ctx2->snum); } /* @@ -200,7 +200,7 @@ 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 (lock->context.server == brl->last_lock.context.server && - lock->context.tid == brl->last_lock.context.tid && + lock->context.snum == brl->last_lock.context.snum && lock->fnum == brl->last_lock.fnum && lock->start == brl->last_lock.start && lock->size == brl->last_lock.size) { @@ -263,7 +263,7 @@ NTSTATUS brl_lock(struct brl_context *brl, lock.context.smbpid = smbpid; lock.context.server = brl->server; - lock.context.tid = brl->tid; + lock.context.snum = brl->snum; lock.start = start; lock.size = size; lock.fnum = fnum; @@ -398,7 +398,7 @@ NTSTATUS brl_unlock(struct brl_context *brl, context.smbpid = smbpid; context.server = brl->server; - context.tid = brl->tid; + context.snum = brl->snum; /* there are existing locks - find a match */ locks = (struct lock_struct *)dbuf.dptr; @@ -548,7 +548,7 @@ NTSTATUS brl_locktest(struct brl_context *brl, lock.context.smbpid = smbpid; lock.context.server = brl->server; - lock.context.tid = brl->tid; + lock.context.snum = brl->snum; lock.start = start; lock.size = size; lock.fnum = fnum; @@ -601,7 +601,7 @@ NTSTATUS brl_close(struct brl_context *brl, for (i=0; i<count; i++) { struct lock_struct *lock = &locks[i]; - if (lock->context.tid == brl->tid && + if (lock->context.snum == brl->snum && lock->context.server == brl->server && lock->fnum == fnum) { /* found it - delete it */ |