]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmb: Remove unused cli_list_trans()
authorVolker Lendecke <vl@samba.org>
Mon, 20 May 2024 08:06:46 +0000 (10:06 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 22 May 2024 04:23:29 +0000 (04:23 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/libsmb/clilist.c
source3/libsmb/proto.h

index 1c35644e2d99d377c02ff2c8221fccb550bb5f27..807e511dc8257a95eeb0bfbff7e980519a77e794 100644 (file)
@@ -937,55 +937,6 @@ static NTSTATUS cli_list_trans_recv(struct tevent_req *req,
        return NT_STATUS_OK;
 }
 
-NTSTATUS cli_list_trans(struct cli_state *cli, const char *mask,
-                       uint32_t attribute, int info_level,
-                       NTSTATUS (*fn)(
-                               struct file_info *finfo,
-                               const char *mask,
-                               void *private_data),
-                       void *private_data)
-{
-       TALLOC_CTX *frame = talloc_stackframe();
-       struct tevent_context *ev;
-       struct tevent_req *req;
-       int i, num_finfo;
-       struct file_info *finfo = NULL;
-       NTSTATUS status = NT_STATUS_NO_MEMORY;
-
-       if (smbXcli_conn_has_async_calls(cli->conn)) {
-               /*
-                * Can't use sync call while an async call is in flight
-                */
-               status = NT_STATUS_INVALID_PARAMETER;
-               goto fail;
-       }
-       ev = samba_tevent_context_init(frame);
-       if (ev == NULL) {
-               goto fail;
-       }
-       req = cli_list_trans_send(frame, ev, cli, mask, attribute, info_level);
-       if (req == NULL) {
-               goto fail;
-       }
-       if (!tevent_req_poll_ntstatus(req, ev, &status)) {
-               goto fail;
-       }
-       status = cli_list_trans_recv(req, frame, &finfo);
-       if (!NT_STATUS_IS_OK(status)) {
-               goto fail;
-       }
-       num_finfo = talloc_array_length(finfo);
-       for (i=0; i<num_finfo; i++) {
-               status = fn(&finfo[i], mask, private_data);
-               if (!NT_STATUS_IS_OK(status)) {
-                       goto fail;
-               }
-       }
- fail:
-       TALLOC_FREE(frame);
-       return status;
-}
-
 struct cli_list_state {
        struct tevent_context *ev;
        struct tevent_req *subreq;
index afeea0f739ec585db4e23b3cbba905e122ad7068..5665c4d6ca483b3eb7022ae2d2c2b6e4747eca49 100644 (file)
@@ -766,13 +766,6 @@ NTSTATUS is_bad_finfo_name(const struct cli_state *cli,
 NTSTATUS cli_list_old(struct cli_state *cli,const char *Mask,uint32_t attribute,
                      NTSTATUS (*fn)(struct file_info *,
                                 const char *, void *), void *state);
-NTSTATUS cli_list_trans(struct cli_state *cli, const char *mask,
-                       uint32_t attribute, int info_level,
-                       NTSTATUS (*fn)(
-                               struct file_info *finfo,
-                               const char *mask,
-                               void *private_data),
-                       void *private_data);
 struct tevent_req *cli_list_send(TALLOC_CTX *mem_ctx,
                                 struct tevent_context *ev,
                                 struct cli_state *cli,