return status;
}
-NTSTATUS cli_connect_nb(const char *host, struct sockaddr_storage *pss,
+NTSTATUS cli_connect_nb(const char *host, const struct sockaddr_storage *dest_ss,
uint16_t port, int name_type, const char *myname,
int signing_state, struct cli_state **pcli)
{
}
}
- status = cli_connect_sock(host, name_type, pss, myname, port, 20, &fd,
- &port);
+ status = cli_connect_sock(host, name_type, dest_ss, myname, port,
+ 20, &fd, &port);
if (!NT_STATUS_IS_OK(status)) {
goto fail;
}
goto fail;
}
- if (pss != NULL) {
- *pss = cli->dest_ss;
- }
-
*pcli = cli;
status = NT_STATUS_OK;
fail:
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)
struct event_context *ev,
struct cli_state *cli);
NTSTATUS cli_negprot_recv(struct tevent_req *req);
-NTSTATUS cli_connect_nb(const char *host, struct sockaddr_storage *pss,
+NTSTATUS cli_connect_nb(const char *host, const struct sockaddr_storage *dest_ss,
uint16_t port, int name_type, const char *myname,
int signing_state, struct cli_state **pcli);
NTSTATUS cli_start_connection(struct cli_state **output_cli,