libcli/smb: add smbXcli_conn_send_queue()
authorStefan Metzmacher <metze@samba.org>
Thu, 29 Aug 2019 10:28:14 +0000 (10:28 +0000)
committerStefan Metzmacher <metze@samba.org>
Thu, 17 Dec 2020 13:59:38 +0000 (13:59 +0000)
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>
libcli/smb/smbXcli_base.c
libcli/smb/smbXcli_base.h

index df80be6bf16fcfbb4ddee44dcda5485083b89c92..0fc4aa4451a4c7ba3ce291b6f7efb9b9c020173c 100644 (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)
index db5f5d587997879bcceeff2778ba1ec6b4fd5b1e..d9c3175bdf5ad8ab130a3cfe6e78c71c8c204ec2 100644 (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);