diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-11-05 02:22:07 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:05:30 -0500 |
commit | 1d97e7b9d8a8e716cd50bb42065687a65d542b2d (patch) | |
tree | 4cb4743b53cbb51dd2f01bf032cd53cba2006b61 /source4/ntvfs/posix/pvfs_open.c | |
parent | 80eef3ea6647a9f8600466b2b468d38bd2eb0664 (diff) | |
download | samba-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_open.c')
-rw-r--r-- | source4/ntvfs/posix/pvfs_open.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c index 73b1949acb..c8f96849ec 100644 --- a/source4/ntvfs/posix/pvfs_open.c +++ b/source4/ntvfs/posix/pvfs_open.c @@ -430,7 +430,7 @@ static int pvfs_retry_destructor(void *ptr) /* retry an open */ -static void pvfs_open_retry(void *private, BOOL timed_out) +static void pvfs_open_retry(void *private, enum pvfs_wait_notice reason) { struct pvfs_open_retry *r = private; struct ntvfs_module_context *ntvfs = r->ntvfs; @@ -438,9 +438,15 @@ static void pvfs_open_retry(void *private, BOOL timed_out) union smb_open *io = r->io; NTSTATUS status; + /* w2k3 ignores SMBntcancel for outstanding open requests. It's probably + just a bug in their server, but we better do the same */ + if (reason == PVFS_WAIT_CANCEL) { + return; + } + talloc_free(r->wait_handle); - if (timed_out) { + if (reason == PVFS_WAIT_TIMEOUT) { /* if it timed out, then give the failure immediately */ talloc_free(r); |