From: Stefan Metzmacher Date: Sun, 3 Jun 2012 14:09:23 +0000 (+0200) Subject: s3:smbd: make conn_close_all() a void function X-Git-Tag: samba-4.0.0beta1~27 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9c80b91d8f793ad97736d8fb75566ca4d907e9cd;p=thirdparty%2Fsamba.git s3:smbd: make conn_close_all() a void function metze --- diff --git a/source3/smbd/conn_idle.c b/source3/smbd/conn_idle.c index f33bd8c89f7..96b76ee3f86 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 7fdbbea2135..6358286ab98 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 9ff3cad1092..593bdacd41c 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); }