uint8_t *rcvbuf;
} read;
} data;
+
+ /**
+ * For requests that don't follow the strict request/reply pattern
+ * such as the transaction request family and echo requests it is
+ * necessary to break the standard procedure in
+ * handle_incoming_pdu(). For a simple example look at
+ * cli_echo_recv_helper().
+ */
+ struct {
+ void (*fn)(struct async_req *req);
+ void *priv;
+ } recv_helper;
};
/*
req->async = NULL;
req->enc_state = NULL;
+ req->recv_helper.fn = NULL;
SSVAL(req->outbuf, smb_tid, cli->cnum);
cli_setup_packet_buf(cli, req->outbuf);
* destructor cli_async_req_destructor().
*/
if (req->async[i] != NULL) {
- async_req_done(req->async[i]);
+ if (req->recv_helper.fn != NULL) {
+ req->recv_helper.fn(req->async[i]);
+ } else {
+ async_req_done(req->async[i]);
+ }
}
}
return;