1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

libcli/smb: add smbXcli_conn_send_queue()

This is useful in order to test async requests
tevent_queue_wait_send/recv() can be used to block
the queue between requests or wait for the queue to be flushed.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Stefan Metzmacher 2019-08-29 10:28:14 +00:00
parent 76121ae7cf
commit 560e4b1b32
2 changed files with 6 additions and 0 deletions

View File

@ -2743,6 +2743,11 @@ NTSTATUS smb1cli_req_chain_submit(struct tevent_req **reqs, int num_reqs)
return NT_STATUS_OK;
}
struct tevent_queue *smbXcli_conn_send_queue(struct smbXcli_conn *conn)
{
return conn->outgoing;
}
bool smbXcli_conn_has_async_calls(struct smbXcli_conn *conn)
{
return ((tevent_queue_length(conn->outgoing) != 0)

View File

@ -43,6 +43,7 @@ struct smbXcli_conn *smbXcli_conn_create(TALLOC_CTX *mem_ctx,
bool smbXcli_conn_is_connected(struct smbXcli_conn *conn);
void smbXcli_conn_disconnect(struct smbXcli_conn *conn, NTSTATUS status);
struct tevent_queue *smbXcli_conn_send_queue(struct smbXcli_conn *conn);
bool smbXcli_conn_has_async_calls(struct smbXcli_conn *conn);
bool smbXcli_conn_dfs_supported(struct smbXcli_conn *conn);