summaryrefslogtreecommitdiff
path: root/source3/smbd/process.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-06-14 07:11:27 +0000
committerAndrew Tridgell <tridge@samba.org>2000-06-14 07:11:27 +0000
commitcc5502a4d01bfc4946fbd198aad75ea03e9734d3 (patch)
tree0f2ed7048c5c403f8bf90e3e259d7aa907f2cc3c /source3/smbd/process.c
parent1896c721fbd01b6d1f95b05350010c17fccbf612 (diff)
downloadsamba-cc5502a4d01bfc4946fbd198aad75ea03e9734d3.tar.gz
samba-cc5502a4d01bfc4946fbd198aad75ea03e9734d3.tar.bz2
samba-cc5502a4d01bfc4946fbd198aad75ea03e9734d3.zip
allow the notify implementation to choose the select timeout change
(This used to be commit b1441d9622609af5ef598c5e1e1f5af438dc0731)
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r--source3/smbd/process.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index b84e55343e..3c85c05312 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -836,21 +836,21 @@ int chain_reply(char *inbuf,char *outbuf,int size,int bufsize)
static int setup_select_timeout(void)
{
- int change_notify_timeout = lp_change_notify_timeout() * 1000;
- int select_timeout;
+ int select_timeout;
+ int t;
- /*
- * Increase the select timeout back to SMBD_SELECT_TIMEOUT if we
- * have removed any blocking locks. JRA.
- */
+ /*
+ * Increase the select timeout back to SMBD_SELECT_TIMEOUT if we
+ * have removed any blocking locks. JRA.
+ */
- select_timeout = blocking_locks_pending() ? SMBD_SELECT_TIMEOUT_WITH_PENDING_LOCKS*1000 :
- SMBD_SELECT_TIMEOUT*1000;
+ select_timeout = blocking_locks_pending() ? SMBD_SELECT_TIMEOUT_WITH_PENDING_LOCKS*1000 :
+ SMBD_SELECT_TIMEOUT*1000;
- if (change_notifies_pending())
- select_timeout = MIN(select_timeout, change_notify_timeout);
+ t = change_notify_timeout();
+ if (t != -1) select_timeout = MIN(select_timeout, t*1000);
- return select_timeout;
+ return select_timeout;
}
/****************************************************************************