summaryrefslogtreecommitdiffstats
path: root/source4/client/client.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-12 02:15:29 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:49:42 +0100
commit4b0199a5493ea2b88558cc40871e63c1dc8dbb56 (patch)
tree684450d46a7787e2f3a2a1b20ac0488c1ca8e94f /source4/client/client.c
parent33582dffcc2d348dc042edfdcccee7500b21d928 (diff)
downloadsamba-4b0199a5493ea2b88558cc40871e63c1dc8dbb56.tar.gz
samba-4b0199a5493ea2b88558cc40871e63c1dc8dbb56.tar.xz
samba-4b0199a5493ea2b88558cc40871e63c1dc8dbb56.zip
r26409: Pass smb ports along.
(This used to be commit 2833f320de1f1fd39c710ad0a61c3fa1bb1df31f)
Diffstat (limited to 'source4/client/client.c')
-rw-r--r--source4/client/client.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/client/client.c b/source4/client/client.c
index 98b13aba4c8..748ee2d7cbe 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -3017,7 +3017,7 @@ static int process_stdin(struct smbclient_context *ctx)
return a connection to a server
*******************************************************/
static bool do_connect(struct smbclient_context *ctx,
- const char *specified_server, const char *specified_share, struct cli_credentials *cred)
+ const char *specified_server, const char **ports, const char *specified_share, struct cli_credentials *cred)
{
NTSTATUS status;
char *server, *share;
@@ -3034,7 +3034,7 @@ static bool do_connect(struct smbclient_context *ctx,
ctx->remote_cur_dir = talloc_strdup(ctx, "\\");
- status = smbcli_full_connection(ctx, &ctx->cli, server,
+ status = smbcli_full_connection(ctx, &ctx->cli, server, ports,
share, NULL, cred,
cli_credentials_get_event_context(cred));
if (!NT_STATUS_IS_OK(status)) {
@@ -3061,7 +3061,7 @@ static int do_host_query(struct loadparm_context *lp_ctx, const char *query_host
/****************************************************************************
handle a message operation
****************************************************************************/
-static int do_message_op(const char *netbios_name, const char *desthost, const char *destip, int name_type, struct resolve_context *resolve_ctx, int max_xmit, int max_mux)
+static int do_message_op(const char *netbios_name, const char *desthost, const char **destports, const char *destip, int name_type, struct resolve_context *resolve_ctx, int max_xmit, int max_mux)
{
struct nbt_name called, calling;
const char *server_name;
@@ -3073,7 +3073,7 @@ static int do_message_op(const char *netbios_name, const char *desthost, const c
server_name = destip ? destip : desthost;
- if (!(cli=smbcli_state_init(NULL)) || !smbcli_socket_connect(cli, server_name, resolve_ctx, max_xmit, max_mux)) {
+ if (!(cli=smbcli_state_init(NULL)) || !smbcli_socket_connect(cli, server_name, destports, resolve_ctx, max_xmit, max_mux)) {
d_printf("Connection to %s failed\n", server_name);
return 1;
}
@@ -3221,10 +3221,10 @@ static int do_message_op(const char *netbios_name, const char *desthost, const c
}
if (message) {
- return do_message_op(lp_netbios_name(cmdline_lp_ctx), desthost, dest_ip, name_type, lp_resolve_context(cmdline_lp_ctx), lp_max_xmit(cmdline_lp_ctx), lp_maxmux(cmdline_lp_ctx));
+ return do_message_op(lp_netbios_name(cmdline_lp_ctx), desthost, lp_smb_ports(cmdline_lp_ctx), dest_ip, name_type, lp_resolve_context(cmdline_lp_ctx), lp_max_xmit(cmdline_lp_ctx), lp_maxmux(cmdline_lp_ctx));
}
- if (!do_connect(ctx, desthost, service, cmdline_credentials))
+ if (!do_connect(ctx, desthost, lp_smb_ports(cmdline_lp_ctx), service, cmdline_credentials))
return 1;
if (base_directory)