]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmb: Make cli_list() prototype more descriptive
authorVolker Lendecke <vl@samba.org>
Sun, 27 Sep 2020 09:41:48 +0000 (11:41 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 30 Sep 2020 15:58:38 +0000 (15:58 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/clilist.c
source3/libsmb/proto.h

index 3a0c10e55b0eb2658c15642a595b68f30d2a992d..59404bce7bf77d33c08df7bdc566d917075417e3 100644 (file)
@@ -1037,9 +1037,14 @@ NTSTATUS cli_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
        return NT_STATUS_OK;
 }
 
-NTSTATUS cli_list(struct cli_state *cli, const char *mask, uint32_t attribute,
-                 NTSTATUS (*fn)(const char *, struct file_info *, const char *,
-                            void *), void *state)
+NTSTATUS cli_list(struct cli_state *cli,
+                 const char *mask,
+                 uint32_t attribute,
+                 NTSTATUS (*fn)(const char *mointpoint,
+                                struct file_info *finfo,
+                                const char *mask,
+                                void *private_data),
+                 void *private_data)
 {
        TALLOC_CTX *frame = NULL;
        struct tevent_context *ev;
@@ -1050,7 +1055,7 @@ NTSTATUS cli_list(struct cli_state *cli, const char *mask, uint32_t attribute,
        uint16_t info_level;
 
        if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) {
-               return cli_smb2_list(cli, mask, attribute, fn, state);
+               return cli_smb2_list(cli, mask, attribute, fn, private_data);
        }
 
        frame = talloc_stackframe();
@@ -1084,7 +1089,8 @@ NTSTATUS cli_list(struct cli_state *cli, const char *mask, uint32_t attribute,
        }
 
        for (i=0; i<num_finfo; i++) {
-               status = fn(cli->dfs_mountpoint, &finfo[i], mask, state);
+               status = fn(
+                       cli->dfs_mountpoint, &finfo[i], mask, private_data);
                if (!NT_STATUS_IS_OK(status)) {
                        goto fail;
                }
index eeabcaa74638ffc38809976712dcfbe3f96e8ce1..cb42df88426094b2659cd5bb3db5ee4a0c6c000c 100644 (file)
@@ -760,9 +760,14 @@ struct tevent_req *cli_list_send(TALLOC_CTX *mem_ctx,
                                 uint16_t info_level);
 NTSTATUS cli_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
                       struct file_info **finfo, size_t *num_finfo);
-NTSTATUS cli_list(struct cli_state *cli,const char *Mask,uint32_t attribute,
-                 NTSTATUS (*fn)(const char *, struct file_info *, const char *,
-                            void *), void *state);
+NTSTATUS cli_list(struct cli_state *cli,
+                 const char *mask,
+                 uint32_t attribute,
+                 NTSTATUS (*fn)(const char *mointpoint,
+                                struct file_info *finfo,
+                                const char *mask,
+                                void *private_data),
+                 void *private_data);
 
 /* The following definitions come from libsmb/climessage.c  */