From 9c80b91d8f793ad97736d8fb75566ca4d907e9cd Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 3 Jun 2012 16:09:23 +0200 Subject: s3:smbd: make conn_close_all() a void function metze --- source3/smbd/conn_idle.c | 7 +------ source3/smbd/proto.h | 2 +- source3/smbd/server_exit.c | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) (limited to 'source3') diff --git a/source3/smbd/conn_idle.c b/source3/smbd/conn_idle.c index f33bd8c89f..96b76ee3f8 100644 --- a/source3/smbd/conn_idle.c +++ b/source3/smbd/conn_idle.c @@ -85,10 +85,8 @@ bool conn_idle_all(struct smbd_server_connection *sconn, time_t t) Return true if any were closed. ****************************************************************************/ -bool conn_close_all(struct smbd_server_connection *sconn) +void conn_close_all(struct smbd_server_connection *sconn) { - bool ret = false; - if (sconn->using_smb2) { /* SMB2 */ struct smbd_smb2_session *sess; @@ -101,7 +99,6 @@ bool conn_close_all(struct smbd_server_connection *sconn) for (tcon = sess->tcons.list; tcon; tcon = tc_next) { tc_next = tcon->next; TALLOC_FREE(tcon); - ret = true; } } } else { @@ -112,10 +109,8 @@ bool conn_close_all(struct smbd_server_connection *sconn) next=conn->next; set_current_service(conn, 0, True); close_cnum(conn, conn->vuid); - ret = true; } } - return ret; } diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 7fdbbea213..6358286ab9 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -149,7 +149,7 @@ bool conn_snum_used(struct smbd_server_connection *sconn, int snum); connection_struct *conn_find(struct smbd_server_connection *sconn, unsigned cnum); connection_struct *conn_new(struct smbd_server_connection *sconn); -bool conn_close_all(struct smbd_server_connection *sconn); +void conn_close_all(struct smbd_server_connection *sconn); bool conn_idle_all(struct smbd_server_connection *sconn, time_t t); void conn_clear_vuid_caches(struct smbd_server_connection *sconn, uint16 vuid); void conn_free(connection_struct *conn); diff --git a/source3/smbd/server_exit.c b/source3/smbd/server_exit.c index 9ff3cad109..593bdacd41 100644 --- a/source3/smbd/server_exit.c +++ b/source3/smbd/server_exit.c @@ -107,7 +107,7 @@ static void exit_server_common(enum server_exit_reason how, bool found = false; files_forall(sconn, log_writeable_file_fn, &found); } - (void)conn_close_all(sconn); + conn_close_all(sconn); invalidate_all_vuids(sconn); } -- cgit