From: Volker Lendecke Date: Mon, 25 May 2020 16:31:10 +0000 (+0200) Subject: libsmb: Remove sync cli_smb2_rmdir() X-Git-Tag: ldb-2.2.0~267 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=19bb7b0096292a21f2676d238d02cac9b100bc2c;p=thirdparty%2Fsamba.git libsmb: Remove sync cli_smb2_rmdir() Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c index 623e3925883..40a4c82708e 100644 --- a/source3/libsmb/cli_smb2_fnum.c +++ b/source3/libsmb/cli_smb2_fnum.c @@ -976,43 +976,6 @@ NTSTATUS cli_smb2_rmdir_recv(struct tevent_req *req) return state->status; } -NTSTATUS cli_smb2_rmdir( - struct cli_state *cli, - const char *dname, - const struct smb2_create_blobs *in_cblobs) -{ - TALLOC_CTX *frame = talloc_stackframe(); - struct tevent_context *ev; - struct tevent_req *req; - NTSTATUS status = NT_STATUS_NO_MEMORY; - bool ok; - - 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_smb2_rmdir_send(frame, ev, cli, dname, in_cblobs); - if (req == NULL) { - goto fail; - } - ok = tevent_req_poll_ntstatus(req, ev, &status); - if (!ok) { - goto fail; - } - status = cli_smb2_rmdir_recv(req); -fail: - cli->raw_status = status; - TALLOC_FREE(frame); - return status; -} - /*************************************************************** Small wrapper that allows SMB2 to unlink a pathname. ***************************************************************/ diff --git a/source3/libsmb/cli_smb2_fnum.h b/source3/libsmb/cli_smb2_fnum.h index f69f92dd1ee..78e219c923c 100644 --- a/source3/libsmb/cli_smb2_fnum.h +++ b/source3/libsmb/cli_smb2_fnum.h @@ -81,10 +81,6 @@ struct tevent_req *cli_smb2_rmdir_send( const char *dname, const struct smb2_create_blobs *in_cblobs); NTSTATUS cli_smb2_rmdir_recv(struct tevent_req *req); -NTSTATUS cli_smb2_rmdir( - struct cli_state *cli, - const char *dname, - const struct smb2_create_blobs *in_cblobs); struct tevent_req *cli_smb2_unlink_send( TALLOC_CTX *mem_ctx, struct tevent_context *ev,