mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
smbXsrv_client: make sure we only wait for smb2srv_client_mc_negprot_filter once and only when needed
This will simplify the following changes... BUG: https://bugzilla.samba.org/show_bug.cgi?id=15200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> (cherry picked from commit 8c8d8cf01e01c2726d03fa1c81e0ce9992ee736c)
This commit is contained in:
parent
fd4c80fcc6
commit
4a44febbc4
@ -471,6 +471,7 @@ struct smb2srv_client_mc_negprot_state {
|
||||
struct db_record *db_rec;
|
||||
uint64_t watch_instance;
|
||||
uint32_t last_seqnum;
|
||||
struct tevent_req *filter_subreq;
|
||||
};
|
||||
|
||||
static void smb2srv_client_mc_negprot_cleanup(struct tevent_req *req,
|
||||
@ -534,6 +535,7 @@ static void smb2srv_client_mc_negprot_next(struct tevent_req *req)
|
||||
NTSTATUS status;
|
||||
uint32_t seqnum = 0;
|
||||
|
||||
TALLOC_FREE(state->filter_subreq);
|
||||
SMB_ASSERT(state->db_rec == NULL);
|
||||
state->db_rec = smbXsrv_client_global_fetch_locked(table->global.db_ctx,
|
||||
&client_guid,
|
||||
@ -610,6 +612,7 @@ static void smb2srv_client_mc_negprot_next(struct tevent_req *req)
|
||||
return;
|
||||
}
|
||||
tevent_req_set_callback(subreq, smb2srv_client_mc_negprot_done, req);
|
||||
state->filter_subreq = subreq;
|
||||
}
|
||||
|
||||
if (procid_is_local(&global->server_id)) {
|
||||
@ -692,6 +695,9 @@ static void smb2srv_client_mc_negprot_done(struct tevent_req *subreq)
|
||||
NTSTATUS status;
|
||||
int ret;
|
||||
|
||||
SMB_ASSERT(state->filter_subreq == subreq);
|
||||
state->filter_subreq = NULL;
|
||||
|
||||
ret = messaging_filtered_read_recv(subreq, state, &rec);
|
||||
TALLOC_FREE(subreq);
|
||||
if (ret != 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user