struct fetch_share_mode_state {
struct file_id id;
TDB_DATA key;
- struct share_mode_lock *lck;
+ struct fetch_share_mode_unlocked_state parser_state;
enum dbwrap_req_state req_state;
};
state->id = id;
state->key = locking_key(&state->id);
- state->lck = talloc_zero(state, struct share_mode_lock);
- if (tevent_req_nomem(state->lck, req)) {
- return tevent_req_post(req, ev);
- }
+ state->parser_state.mem_ctx = state;
subreq = dbwrap_parse_record_send(state,
ev,
lock_db,
state->key,
fetch_share_mode_unlocked_parser,
- state->lck,
+ &state->parser_state,
&state->req_state);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
return status;
}
- if (state->lck->data == NULL) {
+ if (state->parser_state.lck->data == NULL) {
tevent_req_received(req);
return NT_STATUS_NOT_FOUND;
}
- lck = talloc_move(mem_ctx, &state->lck);
+ lck = talloc_move(mem_ctx, &state->parser_state.lck);
if (DEBUGLEVEL >= 10) {
DBG_DEBUG("share_mode_data:\n");