uint16_t credit_charge;
bool signing_skipped;
+ bool notify_async;
+ bool got_async;
} smb2;
};
return req;
}
+void smb2cli_req_set_notify_async(struct tevent_req *req)
+{
+ struct smbXcli_req_state *state =
+ tevent_req_data(req,
+ struct smbXcli_req_state);
+
+ state->smb2.notify_async = true;
+}
+
static void smb2cli_writev_done(struct tevent_req *subreq);
static NTSTATUS smb2cli_conn_dispatch_incoming(struct smbXcli_conn *conn,
TALLOC_CTX *tmp_mem,
}
state = tevent_req_data(req, struct smbXcli_req_state);
+ state->smb2.got_async = false;
+
req_opcode = SVAL(state->smb2.hdr, SMB2_HDR_OPCODE);
if (opcode != req_opcode) {
return NT_STATUS_INVALID_NETWORK_RESPONSE;
req_flags |= SMB2_HDR_FLAG_ASYNC;
SBVAL(state->smb2.hdr, SMB2_HDR_FLAGS, req_flags);
SBVAL(state->smb2.hdr, SMB2_HDR_ASYNC_ID, async_id);
+
+ if (state->smb2.notify_async) {
+ state->smb2.got_async = true;
+ tevent_req_defer_callback(req, state->ev);
+ tevent_req_notify_callback(req);
+ }
continue;
}
*piov = NULL;
}
+ if (state->smb2.got_async) {
+ return STATUS_PENDING;
+ }
+
if (tevent_req_is_nterror(req, &status)) {
for (i=0; i < num_expected; i++) {
if (NT_STATUS_EQUAL(status, expected[i].status)) {