get_deferred_open_message_state_smb2() is buggy in that it is checking
the wrong things to determine if an open is in the deferred state.
It checks if (smb2req->async == NULL) which is incorrect,
as we're not always async in a deferred open - remove this.
It should check instead state->open_was_deferred as this
is explicity set to 'true' when an open is going deferred,
so add this check.
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
a8658bcb67927282288af5a579e3e66d3eaaac7b)
if (!smb2req) {
return false;
}
- if (!smb2req->async) {
- return false;
- }
req = smb2req->subreq;
if (!req) {
return false;
if (!state) {
return false;
}
+ if (!state->open_was_deferred) {
+ return false;
+ }
if (p_request_time) {
*p_request_time = state->request_time;
}