Fix bug #9196 - defer_open is triggered multiple times on the same request.
commita8658bcb67927282288af5a579e3e66d3eaaac7b
authorJeremy Allison <jra@samba.org>
Fri, 14 Dec 2012 16:56:52 +0000 (14 08:56 -0800)
committerKarolin Seeger <kseeger@samba.org>
Wed, 2 Jan 2013 09:34:53 +0000 (2 10:34 +0100)
treed23e6ba7cf0e4bd2792247423c4647f2dab86c95
parent82db35cdb426355e4b7fd7ecf1ce9d9fca59ecd3
Fix bug #9196 - defer_open is triggered multiple times on the same request.

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>
source3/smbd/smb2_create.c