summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_lock.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-05 02:22:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:30 -0500
commit1d97e7b9d8a8e716cd50bb42065687a65d542b2d (patch)
tree4cb4743b53cbb51dd2f01bf032cd53cba2006b61 /source4/ntvfs/posix/pvfs_lock.c
parent80eef3ea6647a9f8600466b2b468d38bd2eb0664 (diff)
downloadsamba-1d97e7b9d8a8e716cd50bb42065687a65d542b2d.tar.gz
samba-1d97e7b9d8a8e716cd50bb42065687a65d542b2d.tar.bz2
samba-1d97e7b9d8a8e716cd50bb42065687a65d542b2d.zip
r3540: added testing of SMBntcancel in the open/open/close mux
testing. Interestingly, w2k3 does not allow the cancel of an outstanding async open request, whereas it does allow the cancel of an outstanding async lock request. To support this I have changed the pvfs_wait interface to provide a enum on why the event is happening, so the callback can decide what to do. (This used to be commit f23d6a28008a13588cde24b5012ec21e488ac47a)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_lock.c')
-rw-r--r--source4/ntvfs/posix/pvfs_lock.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/ntvfs/posix/pvfs_lock.c b/source4/ntvfs/posix/pvfs_lock.c
index 82ac9ebad5..f778b59d95 100644
--- a/source4/ntvfs/posix/pvfs_lock.c
+++ b/source4/ntvfs/posix/pvfs_lock.c
@@ -91,7 +91,7 @@ static void pvfs_lock_async_failed(struct pvfs_state *pvfs,
range, so we should try the lock again. Note that on timeout we
do retry the lock, giving it a last chance.
*/
-static void pvfs_pending_lock_continue(void *private, BOOL timed_out)
+static void pvfs_pending_lock_continue(void *private, enum pvfs_wait_notice reason)
{
struct pvfs_pending_lock *pending = private;
struct pvfs_state *pvfs = pending->pvfs;
@@ -102,6 +102,10 @@ static void pvfs_pending_lock_continue(void *private, BOOL timed_out)
enum brl_type rw;
NTSTATUS status;
int i;
+ BOOL timed_out;
+
+ /* we consider a cancel to be a timeout */
+ timed_out = (reason != PVFS_WAIT_EVENT);
locks = lck->lockx.in.locks + lck->lockx.in.ulock_cnt;