From cac9981b1a88a37c703a76a951b0691fa4ba7b4b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 25 Mar 2010 15:54:29 +0100 Subject: [PATCH] s3:rpc_client: remove more unused code metze --- source3/include/proto.h | 4 ---- source3/rpc_client/rpc_transport_np.c | 12 ----------- source3/rpc_client/rpc_transport_smbd.c | 10 --------- source3/rpc_client/rpc_transport_sock.c | 37 --------------------------------- 4 files changed, 63 deletions(-) diff --git a/source3/include/proto.h b/source3/include/proto.h index a70707b8093..2708c3aac9c 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5385,7 +5385,6 @@ NTSTATUS rpc_transport_np_init(TALLOC_CTX *mem_ctx, struct cli_state *cli, const struct ndr_syntax_id *abstract_syntax, struct rpc_cli_transport **presult); struct cli_state *rpc_pipe_np_smb_conn(struct rpc_pipe_client *p); -void rpccli_close_np_fd(struct rpc_pipe_client *p); /* The following definitions come from rpc_client/rpc_transport_smbd.c */ @@ -5422,9 +5421,6 @@ struct cli_state *rpc_pipe_smbd_smb_conn(struct rpc_pipe_client *p); NTSTATUS rpc_transport_sock_init(TALLOC_CTX *mem_ctx, int fd, struct rpc_cli_transport **presult); -int rpccli_set_sock_timeout(struct rpc_pipe_client *rpccli, int timeout); -void rpccli_close_sock_fd(struct rpc_pipe_client *rpccli); -bool rpc_pipe_tcp_connection_ok(struct rpc_pipe_client *rpccli); /* The following definitions come from rpc_client/cli_samr.c */ diff --git a/source3/rpc_client/rpc_transport_np.c b/source3/rpc_client/rpc_transport_np.c index cf659da592c..e00c1f30ba4 100644 --- a/source3/rpc_client/rpc_transport_np.c +++ b/source3/rpc_client/rpc_transport_np.c @@ -513,15 +513,3 @@ struct cli_state *rpc_pipe_np_smb_conn(struct rpc_pipe_client *p) } return state->cli; } - -void rpccli_close_np_fd(struct rpc_pipe_client *p) -{ - struct cli_state *cli = rpc_pipe_np_smb_conn(p); - if (cli) { - if (cli->fd != -1) { - close(cli->fd); - cli->fd = -1; - } - } - return; -} diff --git a/source3/rpc_client/rpc_transport_smbd.c b/source3/rpc_client/rpc_transport_smbd.c index 690314c192f..57fac68b308 100644 --- a/source3/rpc_client/rpc_transport_smbd.c +++ b/source3/rpc_client/rpc_transport_smbd.c @@ -765,13 +765,3 @@ NTSTATUS rpc_transport_smbd_init(TALLOC_CTX *mem_ctx, TALLOC_FREE(frame); return status; } - -struct cli_state *rpc_pipe_smbd_smb_conn(struct rpc_pipe_client *p) -{ - struct rpc_transport_smbd_state *state = talloc_get_type(p->transport->priv, - struct rpc_transport_smbd_state); - if (!state || !state->conn) { - return NULL; - } - return state->conn->cli; -} diff --git a/source3/rpc_client/rpc_transport_sock.c b/source3/rpc_client/rpc_transport_sock.c index 1c49412d209..b7bb7d70d5a 100644 --- a/source3/rpc_client/rpc_transport_sock.c +++ b/source3/rpc_client/rpc_transport_sock.c @@ -265,40 +265,3 @@ NTSTATUS rpc_transport_sock_init(TALLOC_CTX *mem_ctx, int fd, *presult = result; return NT_STATUS_OK; } - -int rpccli_set_sock_timeout(struct rpc_pipe_client *cli, int timeout) -{ - struct rpc_transport_sock_state *state = talloc_get_type(cli->transport->priv, - struct rpc_transport_sock_state); - int orig_timeout; - if (!state) { - return 0; - } - orig_timeout = state->timeout; - state->timeout = timeout; - return orig_timeout; -} - -void rpccli_close_sock_fd(struct rpc_pipe_client *cli) -{ - struct rpc_transport_sock_state *state = talloc_get_type(cli->transport->priv, - struct rpc_transport_sock_state); - if (state) { - if (state->fd != -1) { - close(state->fd); - state->fd = -1; - } - } - return; -} - -bool rpc_pipe_tcp_connection_ok(struct rpc_pipe_client *cli) -{ - struct rpc_transport_sock_state *state = talloc_get_type(cli->transport->priv, - struct rpc_transport_sock_state); - if (state && state->fd != -1) { - return true; - } - - return false; -} -- 2.11.4.GIT