]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:client: remove unused ports from cifsdd* functions
authorStefan Metzmacher <metze@samba.org>
Thu, 3 Apr 2025 08:53:35 +0000 (10:53 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 18 Apr 2025 10:17:29 +0000 (10:17 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source4/client/cifsdd.c
source4/client/cifsdd.h
source4/client/cifsddio.c

index dc75db90938064ac283516406299335540799e1e..7bbc49df62bd5efea63839baee1691722392af1c 100644 (file)
@@ -399,7 +399,7 @@ static void print_transfer_stats(void)
 
 static struct dd_iohandle * open_file(struct resolve_context *resolve_ctx, 
                                      struct tevent_context *ev,
-                                     const char * which, const char **ports,
+                                     const char * which,
                                      struct smbcli_options *smb_options,
                                      const char *socket_options,
                                      struct smbcli_session_options *smb_session_options,
@@ -423,7 +423,7 @@ static struct dd_iohandle * open_file(struct resolve_context *resolve_ctx,
 
        if (strcmp(which, "if") == 0) {
                path = check_arg_pathname("if");
-               handle = dd_open_path(resolve_ctx, ev, path, ports,
+               handle = dd_open_path(resolve_ctx, ev, path,
                                      check_arg_numeric("ibs"), options,
                                      socket_options,
                                      smb_options, smb_session_options,
@@ -431,7 +431,7 @@ static struct dd_iohandle * open_file(struct resolve_context *resolve_ctx,
        } else if (strcmp(which, "of") == 0) {
                options |= DD_WRITE;
                path = check_arg_pathname("of");
-               handle = dd_open_path(resolve_ctx, ev, path, ports,
+               handle = dd_open_path(resolve_ctx, ev, path,
                                      check_arg_numeric("obs"), options,
                                      socket_options,
                                      smb_options, smb_session_options,
@@ -488,7 +488,7 @@ static int copy_files(struct tevent_context *ev, struct loadparm_context *lp_ctx
                        (unsigned long long)iomax, options.max_xmit));
 
        if (!(ifile = open_file(lpcfg_resolve_context(lp_ctx), ev, "if",
-                               lpcfg_smb_ports(lp_ctx), &options,
+                               &options,
                                lpcfg_socket_options(lp_ctx),
                                &session_options, 
                                lpcfg_gensec_settings(lp_ctx, lp_ctx)))) {
@@ -497,7 +497,7 @@ static int copy_files(struct tevent_context *ev, struct loadparm_context *lp_ctx
        }
 
        if (!(ofile = open_file(lpcfg_resolve_context(lp_ctx), ev, "of",
-                               lpcfg_smb_ports(lp_ctx), &options,
+                               &options,
                                lpcfg_socket_options(lp_ctx),
                                &session_options,
                                lpcfg_gensec_settings(lp_ctx, lp_ctx)))) {
index 4e9cb9dd9a3bbe03886480ed2120f920f6f0f08c..0663d83b5dbdc6ffe5b667822ed8e2f1966ad72c 100644 (file)
@@ -95,7 +95,6 @@ struct tevent_context;
 struct dd_iohandle * dd_open_path(struct resolve_context *resolve_ctx, 
                                  struct tevent_context *ev,
                                  const char * path,
-                                 const char **ports,
                                uint64_t io_size, int options, 
                                const char *socket_options,
                                struct smbcli_options *smb_options,
index 203652e71edb483c9c47fc0bf45836815e51d839..f0c34c04b5756c6e5e1972aace06fa0b3e035f9a 100644 (file)
@@ -222,7 +222,6 @@ static bool smb_write_func(void * handle, uint8_t * buf, uint64_t wanted,
 static struct smbcli_state * init_smb_session(struct resolve_context *resolve_ctx,
                                              struct tevent_context *ev,
                                              const char * host,
-                                             const char **ports,
                                              const char * share,
                                              const char *socket_options,
                                              struct smbcli_options *options,
@@ -303,7 +302,6 @@ static int open_smb_file(struct smbcli_state * cli,
 static struct dd_iohandle * open_cifs_handle(struct resolve_context *resolve_ctx,
                                             struct tevent_context *ev,
                                             const char * host,
-                                       const char **ports,
                                        const char * share,
                                        const char * path,
                                        uint64_t io_size,
@@ -331,7 +329,7 @@ static struct dd_iohandle * open_cifs_handle(struct resolve_context *resolve_ctx
        smbh->h.io_write = smb_write_func;
        smbh->h.io_seek = smb_seek_func;
 
-       if ((smbh->cli = init_smb_session(resolve_ctx, ev, host, ports, share,
+       if ((smbh->cli = init_smb_session(resolve_ctx, ev, host, share,
                                          socket_options,
                                          smb_options, smb_session_options,
                                          gensec_settings)) == NULL) {
@@ -352,7 +350,6 @@ static struct dd_iohandle * open_cifs_handle(struct resolve_context *resolve_ctx
 struct dd_iohandle * dd_open_path(struct resolve_context *resolve_ctx, 
                                  struct tevent_context *ev,
                                  const char * path,
-                                 const char **ports,
                                uint64_t io_size,
                                int options,
                                const char *socket_options,
@@ -373,7 +370,7 @@ struct dd_iohandle * dd_open_path(struct resolve_context *resolve_ctx,
                        /* Skip over leading directory separators. */
                        while (*remain == '/' || *remain == '\\') { remain++; }
 
-                       return(open_cifs_handle(resolve_ctx, ev, host, ports,
+                       return(open_cifs_handle(resolve_ctx, ev, host,
                                                share, remain,
                                                io_size, options, 
                                                socket_options, smb_options,