summaryrefslogtreecommitdiffstats
path: root/source/smbd/oplock.c
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2006-02-13 04:07:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:05 -0500
commit1dce945ccbba25092cf54890301c8f78f8aede33 (patch)
tree91702ed6823c797c7ab36c77c4a1c4fe6bcb979d /source/smbd/oplock.c
parentc15f1d553f03ad1ed4e1d52b8e46c52202bc3a83 (diff)
downloadsamba-1dce945ccbba25092cf54890301c8f78f8aede33.tar.gz
samba-1dce945ccbba25092cf54890301c8f78f8aede33.tar.xz
samba-1dce945ccbba25092cf54890301c8f78f8aede33.zip
r13482: Push the FAM notification file descriptor into the select
set to avoid unnecessary polling.
Diffstat (limited to 'source/smbd/oplock.c')
-rw-r--r--source/smbd/oplock.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/source/smbd/oplock.c b/source/smbd/oplock.c
index 755bcffc7f7..41eb809909c 100644
--- a/source/smbd/oplock.c
+++ b/source/smbd/oplock.c
@@ -240,21 +240,16 @@ BOOL downgrade_oplock(files_struct *fsp)
}
/****************************************************************************
- Setup the listening set of file descriptors for an oplock break
- message either from the UDP socket or from the kernel. Returns the maximum
- fd used.
+ Return the fd (if any) used for receiving oplock notifications.
****************************************************************************/
-int setup_oplock_select_set( fd_set *fds)
+int oplock_notify_fd(void)
{
- int maxfd = 0;
-
- if (koplocks && koplocks->notification_fd != -1) {
- FD_SET(koplocks->notification_fd, fds);
- maxfd = MAX(maxfd, koplocks->notification_fd);
+ if (koplocks) {
+ return koplocks->notification_fd;
}
- return maxfd;
+ return -1;
}
/****************************************************************************