summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2003-05-06 17:52:11 +0000
committerJelmer Vernooij <jelmer@samba.org>2003-05-06 17:52:11 +0000
commit078e66c8d24f4ad92d523e75db72618f68ec7e24 (patch)
tree1ca23402cc81c5dc17e48f6b42089c572d9f553f /source3/smbd
parente4719169747ef03bbd4e7835d099e7901b65c29d (diff)
downloadsamba-078e66c8d24f4ad92d523e75db72618f68ec7e24.tar.gz
samba-078e66c8d24f4ad92d523e75db72618f68ec7e24.tar.bz2
samba-078e66c8d24f4ad92d523e75db72618f68ec7e24.zip
Add metze's exit and idle event patch
(This used to be commit e599eba851db40816c684da2b7b1be4b978166e0)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/process.c7
-rw-r--r--source3/smbd/server.c3
2 files changed, 10 insertions, 0 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 54fd4a90d9..18acb35f7a 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -1114,6 +1114,9 @@ static BOOL timeout_processing(int deadtime, int *select_timeout, time_t *last_t
/* become root again if waiting */
change_to_root_user();
+ /* run all registered idle events */
+ smb_run_idle_events(t);
+
/* check if we need to reload services */
check_reload(t);
@@ -1277,6 +1280,10 @@ void smbd_process(void)
lp_talloc_free();
main_loop_talloc_free();
+ /* run all registered idle events */
+ smb_run_idle_events(time(NULL));
+
+
/* Did someone ask for immediate checks on things like blocking locks ? */
if (select_timeout == 0) {
if(!timeout_processing( deadtime, &select_timeout, &last_timeout_processing_time))
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index ef27f0b7a4..c24fc5134d 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -567,6 +567,9 @@ void exit_server(const char *reason)
print_notify_send_messages(3); /* 3 second timeout. */
+ /* run all registered exit events */
+ smb_run_exit_events();
+
/* delete our entry in the connections database. */
yield_connection(NULL,"");