diff options
author | Jeremy Allison <jra@samba.org> | 2003-01-17 06:35:33 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-01-17 06:35:33 +0000 |
commit | 074c99a852ce79f4c7791d709b82dc80c32e4d04 (patch) | |
tree | 7bbc22942d8a5fd227e981187eb2e49eb8a3a251 /source3/smbd/conn.c | |
parent | 96c795cea7518b50a40caba34e656f056a832589 (diff) | |
download | samba-074c99a852ce79f4c7791d709b82dc80c32e4d04.tar.gz samba-074c99a852ce79f4c7791d709b82dc80c32e4d04.tar.bz2 samba-074c99a852ce79f4c7791d709b82dc80c32e4d04.zip |
Fix reference count bug where smbd's would not terminate with no
open resources.
Jeremy.
(This used to be commit 0173d6fe164568a73247fa542895443fad6c20c3)
Diffstat (limited to 'source3/smbd/conn.c')
-rw-r--r-- | source3/smbd/conn.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c index 22407348e8..c771f1254b 100644 --- a/source3/smbd/conn.c +++ b/source3/smbd/conn.c @@ -136,10 +136,12 @@ void conn_close_all(void) } /**************************************************************************** -idle inactive connections + Idle inactive connections. ****************************************************************************/ + BOOL conn_idle_all(time_t t, int deadtime) { + pipes_struct *plist = NULL; BOOL allidle = True; connection_struct *conn, *next; @@ -154,6 +156,15 @@ BOOL conn_idle_all(time_t t, int deadtime) allidle = False; } + /* + * Check all pipes for any open handles. We cannot + * idle with a handle open. + */ + + for (plist = get_first_internal_pipe(); plist; plist = get_next_internal_pipe(plist)) + if (plist->pipe_handles && plist->pipe_handles->count) + allidle = False; + return allidle; } |