diff options
author | Jeremy Allison <jra@samba.org> | 2006-02-14 23:00:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:10:07 -0500 |
commit | 006cf9c3654e7f18e01b75a5fe87798df862d26a (patch) | |
tree | 1e6f44379cccce99f00b258d592099ab7b650936 /source/smbd/oplock.c | |
parent | a28bc614a0eb8409a98b254b32ad17c50c2eec0e (diff) | |
download | samba-006cf9c3654e7f18e01b75a5fe87798df862d26a.tar.gz |
r13498: Fix the kernel oplocks code for IRIX. Should fix #3515.
Jeremy.
Diffstat (limited to 'source/smbd/oplock.c')
-rw-r--r-- | source/smbd/oplock.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/source/smbd/oplock.c b/source/smbd/oplock.c index 41eb809909c..3efd6306490 100644 --- a/source/smbd/oplock.c +++ b/source/smbd/oplock.c @@ -56,23 +56,14 @@ BOOL oplock_message_waiting(fd_set *fds) } /**************************************************************************** - Read an oplock break message from either the oplock UDP fd or the - kernel (if kernel oplocks are supported). - - If timeout is zero then *fds contains the file descriptors that - are ready to be read and acted upon. If timeout is non-zero then - *fds contains the file descriptors to be selected on for read. - The timeout is in milliseconds - + Find out if there are any kernel oplock messages waiting and process them + if so. pfds is the fd_set from the main select loop (which contains any + kernel oplock fd if that's what the system uses (IRIX). If may be NULL if + we're calling this in a shutting down state. ****************************************************************************/ -void process_kernel_oplocks(void) +void process_kernel_oplocks(fd_set *pfds) { - fd_set fds; - - FD_ZERO(&fds); - smb_read_error = 0; - /* * We need to check for kernel oplocks before going into the select * here, as the EINTR generated by the linux kernel oplock may have @@ -83,11 +74,11 @@ void process_kernel_oplocks(void) return; } - while (koplocks->msg_waiting(&fds)) { + while (koplocks->msg_waiting(pfds)) { files_struct *fsp; char msg[MSG_SMB_KERNEL_BREAK_SIZE]; - fsp = koplocks->receive_message(&fds); + fsp = koplocks->receive_message(pfds); if (fsp == NULL) { DEBUG(3, ("Kernel oplock message announced, but none " |