From: Volker Lendecke Date: Sun, 27 Sep 2020 09:41:48 +0000 (+0200) Subject: libsmb: Make cli_list() prototype more descriptive X-Git-Tag: talloc-2.3.2~434 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6ee90adf737db320095c82ebc8e582769fde9eba;p=thirdparty%2Fsamba.git libsmb: Make cli_list() prototype more descriptive Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c index 3a0c10e55b0..59404bce7bf 100644 --- a/source3/libsmb/clilist.c +++ b/source3/libsmb/clilist.c @@ -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; idfs_mountpoint, &finfo[i], mask, state); + status = fn( + cli->dfs_mountpoint, &finfo[i], mask, private_data); if (!NT_STATUS_IS_OK(status)) { goto fail; } diff --git a/source3/libsmb/proto.h b/source3/libsmb/proto.h index eeabcaa7463..cb42df88426 100644 --- a/source3/libsmb/proto.h +++ b/source3/libsmb/proto.h @@ -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 */