return smbd_smb2_request_error(req, NT_STATUS_FILE_CLOSED);
}
- subreq = smbd_smb2_query_directory_send(req, req->ev_ctx,
+ subreq = smbd_smb2_query_directory_send(req, req->sconn->ev_ctx,
req, in_fsp,
in_file_info_class,
in_flags,
if (req == NULL) {
return NULL;
}
- state->ev = fsp->conn->sconn->raw_ev_ctx;
+ state->ev = ev;
state->fsp = fsp;
state->smb2req = smb2req;
state->in_output_buffer_length = in_output_buffer_length;
if (state->async_dosmode) {
size_t max_threads;
- max_threads = pthreadpool_tevent_max_threads(conn->sconn->raw_thread_pool);
+ max_threads = pthreadpool_tevent_max_threads(conn->sconn->pool);
+ if (max_threads == 0 || !per_thread_cwd_supported()) {
+ state->async_dosmode = false;
+ }
state->max_async_dosmode_active = lp_smbd_max_async_dosmode(
SNUM(conn));
state->async_dosmode_active++;
outstanding_aio = pthreadpool_tevent_queued_jobs(
- state->fsp->conn->sconn->raw_thread_pool);
+ state->fsp->conn->sconn->pool);
if (outstanding_aio > state->max_async_dosmode_active) {
stop = true;