From 5c149702b0885db8d63f189f4bba0e17fdaad7a4 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 14 Feb 2006 23:00:39 +0000 Subject: r13498: Fix the kernel oplocks code for IRIX. Should fix #3515. Jeremy. (This used to be commit 006cf9c3654e7f18e01b75a5fe87798df862d26a) --- source3/smbd/oplock.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'source3/smbd/oplock.c') diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index 41eb809909..3efd630649 100644 --- a/source3/smbd/oplock.c +++ b/source3/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 " -- cgit