summaryrefslogtreecommitdiff
path: root/source3/smbd/oplock.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-02-14 23:00:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:07 -0500
commit5c149702b0885db8d63f189f4bba0e17fdaad7a4 (patch)
tree36176b6c105694a97a539785f0c32b99ea799eaa /source3/smbd/oplock.c
parent7f7c9849e4aed9ff7b51989a81f6039c5b59f2dd (diff)
downloadsamba-5c149702b0885db8d63f189f4bba0e17fdaad7a4.tar.gz
samba-5c149702b0885db8d63f189f4bba0e17fdaad7a4.tar.bz2
samba-5c149702b0885db8d63f189f4bba0e17fdaad7a4.zip
r13498: Fix the kernel oplocks code for IRIX. Should fix #3515.
Jeremy. (This used to be commit 006cf9c3654e7f18e01b75a5fe87798df862d26a)
Diffstat (limited to 'source3/smbd/oplock.c')
-rw-r--r--source3/smbd/oplock.c23
1 files changed, 7 insertions, 16 deletions
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 "