summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc/dcerpc.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-08-30 05:35:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:25 -0500
commit4db64692e717d10dcd69cc745e8d69a5f4a2be9d (patch)
tree6cdcd1af52ec40f1232e7736ab88e6025a485e28 /source4/librpc/rpc/dcerpc.c
parentf3d946646975cc04c5abd6b41adaf547175d6aab (diff)
downloadsamba-4db64692e717d10dcd69cc745e8d69a5f4a2be9d.tar.gz
samba-4db64692e717d10dcd69cc745e8d69a5f4a2be9d.tar.bz2
samba-4db64692e717d10dcd69cc745e8d69a5f4a2be9d.zip
r2103: in the conversion to async rpc I simplified the smb backend to only
use readx/writex instead of the more efficient SMBtrans calls. This patch restores the efficiency by using SMBtrans when possible. (This used to be commit 83fbe080e7fcdf4168d85f654b802dc4538b8984)
Diffstat (limited to 'source4/librpc/rpc/dcerpc.c')
-rw-r--r--source4/librpc/rpc/dcerpc.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index 1a8fe7373a..61e5c1c8b2 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -352,7 +352,7 @@ static void full_request_recv(struct dcerpc_pipe *p, DATA_BLOB *blob,
}
/*
- perform a synchronous request - used for the bind code
+ perform a single pdu synchronous request - used for the bind code
this cannot be mixed with normal async requests
*/
static NTSTATUS full_request(struct dcerpc_pipe *p,
@@ -373,13 +373,11 @@ static NTSTATUS full_request(struct dcerpc_pipe *p,
p->transport.recv_data = full_request_recv;
p->full_request_private = state;
- status = p->transport.send_request(p, request_blob);
+ status = p->transport.send_request(p, request_blob, True);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
- p->transport.send_read(p);
-
while (NT_STATUS_IS_OK(state->status) && state->reply_blob) {
struct event_context *ctx = p->transport.event_context(p);
event_loop_once(ctx);
@@ -563,7 +561,7 @@ NTSTATUS dcerpc_auth3(struct dcerpc_pipe *p,
}
/* send it on its way */
- status = p->transport.send_request(p, &blob);
+ status = p->transport.send_request(p, &blob, False);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -757,7 +755,7 @@ struct rpc_request *dcerpc_request_send(struct dcerpc_pipe *p,
return req;
}
- req->status = p->transport.send_request(p, &blob);
+ req->status = p->transport.send_request(p, &blob, False);
if (!NT_STATUS_IS_OK(req->status)) {
req->state = RPC_REQUEST_DONE;
return req;
@@ -783,8 +781,8 @@ struct rpc_request *dcerpc_request_send(struct dcerpc_pipe *p,
return req;
}
- /* send the pdu */
- req->status = p->transport.send_request(p, &blob);
+ /* send the final pdu */
+ req->status = p->transport.send_request(p, &blob, True);
if (!NT_STATUS_IS_OK(req->status)) {
req->state = RPC_REQUEST_DONE;
@@ -792,8 +790,6 @@ struct rpc_request *dcerpc_request_send(struct dcerpc_pipe *p,
DLIST_ADD(p->pending, req);
- p->transport.send_read(p);
-
return req;
}