From b4ba2cb91ea19349dbb9ce6897dca2db0aec7644 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 6 Apr 2025 19:05:19 +0200 Subject: [PATCH] example/fuse: pass struct smb_transports to connect_one() Signed-off-by: Stefan Metzmacher Reviewed-by: Volker Lendecke --- examples/fuse/smb2mount.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/fuse/smb2mount.c b/examples/fuse/smb2mount.c index 82a2f15bda0..3cc45c81323 100644 --- a/examples/fuse/smb2mount.c +++ b/examples/fuse/smb2mount.c @@ -27,20 +27,20 @@ #include "clifuse.h" static struct cli_state *connect_one(struct cli_credentials *creds, - const char *server, int port, + const char *server, + const struct smb_transports *transports, const char *share) { struct cli_state *c = NULL; NTSTATUS nt_status; uint32_t flags = 0; - struct smb_transports ts = smbsock_transports_from_port(port); nt_status = cli_full_connection_creds(talloc_tos(), &c, lp_netbios_name(), server, NULL, - &ts, + transports, share, "?????", creds, @@ -65,6 +65,7 @@ int main(int argc, char *argv[]) char *unc, *mountpoint, *server, *share; struct cli_state *cli; struct cli_credentials *creds = NULL; + struct smb_transports ts = { .num_transports = 0, }; bool ok; struct poptOption long_options[] = { @@ -150,7 +151,9 @@ int main(int argc, char *argv[]) creds = samba_cmdline_get_creds(); - cli = connect_one(creds, server, port, share); + ts = smbsock_transports_from_port(port); + + cli = connect_one(creds, server, &ts, share); if (cli == NULL) { return -1; } -- 2.47.3