diff options
author | Simo Sorce <ssorce@redhat.com> | 2010-06-07 14:08:05 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2010-06-07 17:25:48 -0400 |
commit | 5da783f4a79ee0a927f2483ae20b691074bb3007 (patch) | |
tree | 6da8069e95481055ca5c9d51548049305202e2ae /source3/smbd | |
parent | f9fc4df0c0a6401d185b057c17d6b30ef549b3d0 (diff) | |
download | samba-5da783f4a79ee0a927f2483ae20b691074bb3007.tar.gz samba-5da783f4a79ee0a927f2483ae20b691074bb3007.tar.bz2 samba-5da783f4a79ee0a927f2483ae20b691074bb3007.zip |
s3:smbd add utility function to check if there are open pipes
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/conn.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c index afb7a7fa85..707f6c4aa1 100644 --- a/source3/smbd/conn.c +++ b/source3/smbd/conn.c @@ -213,7 +213,6 @@ bool conn_close_all(struct smbd_server_connection *sconn) bool conn_idle_all(struct smbd_server_connection *sconn,time_t t) { int deadtime = lp_deadtime()*60; - pipes_struct *plist = NULL; connection_struct *conn; if (deadtime <= 0) @@ -243,14 +242,10 @@ bool conn_idle_all(struct smbd_server_connection *sconn,time_t t) * 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 (num_pipe_handles(plist->pipe_handles) != 0) { - return False; - } + if (check_open_pipes()) { + return False; } - + return True; } |