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

s3:rpc_transport_tstream: only use tstream_cli_np_use_trans() for sync requests

Currently the caller doesn't cope with multiple async requests anyway,
so this is just protection for the future.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Aug  5 22:31:12 CEST 2011 on sn-devel-104
This commit is contained in:
Stefan Metzmacher 2011-07-28 14:15:15 +02:00
parent dfa8a5fca5
commit 56319cf1b7

View File

@ -380,6 +380,12 @@ static struct tevent_req *rpc_tstream_trans_send(TALLOC_CTX *mem_ctx,
if (tstream_is_cli_np(transp->stream)) {
use_trans = true;
}
if (tevent_queue_length(transp->write_queue) > 0) {
use_trans = false;
}
if (tevent_queue_length(transp->read_queue) > 0) {
use_trans = false;
}
if (use_trans) {
tstream_cli_np_use_trans(transp->stream);