diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-07-22 12:01:27 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-07-22 17:06:08 +0200 |
commit | 1eb8c2ae22e667f3319afb0b32164cc80bb25cd0 (patch) | |
tree | 2768fb3f952696b93db3e9a7a6a488b7ba28b921 /source3 | |
parent | 6cc61d63413d143bddcd6d252103ead7dbadcb7c (diff) | |
download | samba-1eb8c2ae22e667f3319afb0b32164cc80bb25cd0.tar.gz samba-1eb8c2ae22e667f3319afb0b32164cc80bb25cd0.tar.bz2 samba-1eb8c2ae22e667f3319afb0b32164cc80bb25cd0.zip |
s3:libsmb: only pass a const sockaddr_storage to cli_start_connection()
Let the caller use cli_state_remote_sockaddr() if needed.
metze
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/cliconnect.c | 10 | ||||
-rw-r--r-- | source3/libsmb/proto.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 9742c266b0..13e6877024 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -2892,7 +2892,7 @@ fail: NTSTATUS cli_start_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, int signing_state, int flags) { NTSTATUS nt_status; @@ -2906,10 +2906,6 @@ NTSTATUS cli_start_connection(struct cli_state **output_cli, return nt_status; } - if (dest_ss != NULL) { - *dest_ss = *cli_state_remote_sockaddr(cli);; - } - if (flags & CLI_FULL_CONNECTION_DONT_SPNEGO) cli->use_spnego = False; else if (flags & CLI_FULL_CONNECTION_USE_KERBEROS) @@ -2975,6 +2971,10 @@ 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 1a57646457..916e161d8e 100644 --- a/source3/libsmb/proto.h +++ b/source3/libsmb/proto.h @@ -82,7 +82,7 @@ NTSTATUS cli_connect_nb(const char *host, const struct sockaddr_storage *dest_ss NTSTATUS cli_start_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, int signing_state, int flags); NTSTATUS cli_full_connection(struct cli_state **output_cli, const char *my_name, |