From: Volker Lendecke Date: Tue, 26 May 2020 07:01:57 +0000 (+0200) Subject: pylibsmb: Use async cli_rmdir also for smb2 X-Git-Tag: ldb-2.2.0~266 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=825948c766c4d3b66897b9a8f73754fa430bc96d;p=thirdparty%2Fsamba.git pylibsmb: Use async cli_rmdir also for smb2 Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/libsmb/pylibsmb.c b/source3/libsmb/pylibsmb.c index 38bcae73db0..20dc3482d60 100644 --- a/source3/libsmb/pylibsmb.c +++ b/source3/libsmb/pylibsmb.c @@ -1292,19 +1292,15 @@ static PyObject *py_smb_unlink(struct py_cli_state *self, PyObject *args) static NTSTATUS remove_dir(struct py_cli_state *self, const char *dirname) { NTSTATUS status; + struct tevent_req *req = NULL; - if (self->is_smb1) { - struct tevent_req *req = NULL; - - req = cli_rmdir_send(NULL, self->ev, self->cli, dirname); - if (!py_tevent_req_wait_exc(self, req)) { - return NT_STATUS_INTERNAL_ERROR; - } - status = cli_rmdir_recv(req); - TALLOC_FREE(req); - } else { - status = cli_rmdir(self->cli, dirname); + req = cli_rmdir_send(NULL, self->ev, self->cli, dirname); + if (!py_tevent_req_wait_exc(self, req)) { + return NT_STATUS_INTERNAL_ERROR; } + status = cli_rmdir_recv(req); + TALLOC_FREE(req); + return status; }