From: Volker Lendecke Date: Mon, 25 May 2020 16:31:10 +0000 (+0200) Subject: libsmb: Remove sync cli_smb2_unlink() X-Git-Tag: ldb-2.2.0~279 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a92a4324c74c30d2bb20ff1432d0622eaf382a64;p=thirdparty%2Fsamba.git libsmb: Remove sync cli_smb2_unlink() 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 85d061b04d4..623e3925883 100644 --- a/source3/libsmb/cli_smb2_fnum.c +++ b/source3/libsmb/cli_smb2_fnum.c @@ -1160,43 +1160,6 @@ NTSTATUS cli_smb2_unlink_recv(struct tevent_req *req) return tevent_req_simple_recv_ntstatus(req); } -NTSTATUS cli_smb2_unlink( - struct cli_state *cli, - const char *fname, - 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_unlink_send(frame, ev, cli, fname, in_cblobs); - if (req == NULL) { - goto fail; - } - ok = tevent_req_poll_ntstatus(req, ev, &status); - if (!ok) { - goto fail; - } - status = cli_smb2_unlink_recv(req); -fail: - cli->raw_status = status; - TALLOC_FREE(frame); - return status; -} - /*************************************************************** Utility function to parse a SMB2_FIND_ID_BOTH_DIRECTORY_INFO reply. ***************************************************************/ diff --git a/source3/libsmb/cli_smb2_fnum.h b/source3/libsmb/cli_smb2_fnum.h index 202cf84bc0e..f69f92dd1ee 100644 --- a/source3/libsmb/cli_smb2_fnum.h +++ b/source3/libsmb/cli_smb2_fnum.h @@ -92,10 +92,6 @@ struct tevent_req *cli_smb2_unlink_send( const char *fname, const struct smb2_create_blobs *in_cblobs); NTSTATUS cli_smb2_unlink_recv(struct tevent_req *req); -NTSTATUS cli_smb2_unlink( - struct cli_state *cli, - const char *fname, - const struct smb2_create_blobs *in_cblobs); NTSTATUS cli_smb2_list(struct cli_state *cli, const char *pathname, uint16_t attribute,