From 5c7749ac244aa8b83b05599d4bdd13fac2fc2416 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 22 Jul 2011 13:03:19 +0200 Subject: s3:libsmb: only pass const sockaddr_storage to cli_full_connection() No direct or indirect caller needs this to be set. metze --- source3/libsmb/cliconnect.c | 6 +----- source3/libsmb/proto.h | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 13e6877024d..7b6da776f78 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -2947,7 +2947,7 @@ NTSTATUS cli_start_connection(struct cli_state **output_cli, NTSTATUS cli_full_connection(struct cli_state **output_cli, const char *my_name, const char *dest_host, - struct sockaddr_storage *dest_ss, int port, + const struct sockaddr_storage *dest_ss, int port, const char *service, const char *service_type, const char *user, const char *domain, const char *password, int flags, @@ -2971,10 +2971,6 @@ NTSTATUS cli_full_connection(struct cli_state **output_cli, return nt_status; } - if (dest_ss != NULL) { - *dest_ss = *cli_state_remote_sockaddr(cli);; - } - cli->use_oplocks = ((flags & CLI_FULL_CONNECTION_OPLOCKS) != 0); cli->use_level_II_oplocks = ((flags & CLI_FULL_CONNECTION_LEVEL_II_OPLOCKS) != 0); diff --git a/source3/libsmb/proto.h b/source3/libsmb/proto.h index 916e161d8ee..9e60fe9a946 100644 --- a/source3/libsmb/proto.h +++ b/source3/libsmb/proto.h @@ -87,7 +87,7 @@ NTSTATUS cli_start_connection(struct cli_state **output_cli, NTSTATUS cli_full_connection(struct cli_state **output_cli, const char *my_name, const char *dest_host, - struct sockaddr_storage *dest_ss, int port, + const struct sockaddr_storage *dest_ss, int port, const char *service, const char *service_type, const char *user, const char *domain, const char *password, int flags, -- cgit