From 82895ab22fb19fabe43ec29365dbe33da0b917f2 Mon Sep 17 00:00:00 2001 From: Luk Claes Date: Sun, 20 May 2012 16:26:25 +0200 Subject: [PATCH] s3:libsmb: get rid of cli_state_disconnect Signed-off-by: Luk Claes Signed-off-by: Stefan Metzmacher --- source3/libsmb/clientgen.c | 2 +- source3/libsmb/clierror.c | 9 --------- source3/libsmb/proto.h | 1 - source3/torture/torture.c | 2 +- source3/winbindd/winbindd_cm.c | 4 ++-- 5 files changed, 4 insertions(+), 14 deletions(-) diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index 20f9afdfa02..d4138e91727 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -323,7 +323,7 @@ static void _cli_shutdown(struct cli_state *cli) data_blob_free(&cli->user_session_key); - cli_state_disconnect(cli); + smbXcli_conn_disconnect(cli->conn, NT_STATUS_OK); TALLOC_FREE(cli); } diff --git a/source3/libsmb/clierror.c b/source3/libsmb/clierror.c index 4997d41fdf9..a53c9c4e1e8 100644 --- a/source3/libsmb/clierror.c +++ b/source3/libsmb/clierror.c @@ -190,12 +190,3 @@ bool cli_state_is_connected(struct cli_state *cli) return smbXcli_conn_is_connected(cli->conn); } - -void cli_state_disconnect(struct cli_state *cli) -{ - /* - * passing NT_STATUS_OK means the caller will not - * be notified, which matches the old behavior - */ - smbXcli_conn_disconnect(cli->conn, NT_STATUS_OK); -} diff --git a/source3/libsmb/proto.h b/source3/libsmb/proto.h index db45016ecba..a584a637634 100644 --- a/source3/libsmb/proto.h +++ b/source3/libsmb/proto.h @@ -207,7 +207,6 @@ bool cli_is_error(struct cli_state *cli); bool cli_is_nt_error(struct cli_state *cli); bool cli_is_dos_error(struct cli_state *cli); bool cli_state_is_connected(struct cli_state *cli); -void cli_state_disconnect(struct cli_state *cli); /* The following definitions come from libsmb/clifile.c */ diff --git a/source3/torture/torture.c b/source3/torture/torture.c index bad39861884..b49a7a73e24 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -2580,7 +2580,7 @@ static void alarm_handler(int dummy) static void alarm_handler_parent(int dummy) { - cli_state_disconnect(alarm_cli); + smbXcli_conn_disconnect(alarm_cli->conn, NT_STATUS_OK); } static void do_local_lock(int read_fd, int write_fd) diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 81d19a9d725..d4af23783df 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -1691,7 +1691,7 @@ void close_conns_after_fork(void) * requests in invalidate_cm_connection() */ if (cli_state_is_connected(domain->conn.cli)) { - cli_state_disconnect(domain->conn.cli); + smbXcli_conn_disconnect(domain->conn.cli->conn, NT_STATUS_OK); } invalidate_cm_connection(&domain->conn); @@ -2725,7 +2725,7 @@ void winbind_msg_ip_dropped(struct messaging_context *msg_ctx, smbXcli_conn_local_sockaddr(domain->conn.cli->conn)); if (strequal(sockaddr, addr)) { - cli_state_disconnect(domain->conn.cli); + smbXcli_conn_disconnect(domain->conn.cli->conn, NT_STATUS_OK); } } TALLOC_FREE(freeit);