summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-08-25 02:06:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:19 -0500
commit2ed3ab021deb8e091a6a1a077010824f31b6d5bf (patch)
treeb9564a09a7035b683838211cb6d772a63728115a
parent35d65298d5892ad2709d9c5a628179ba48fd46ba (diff)
downloadsamba-2ed3ab021deb8e091a6a1a077010824f31b6d5bf.tar.gz
samba-2ed3ab021deb8e091a6a1a077010824f31b6d5bf.tar.bz2
samba-2ed3ab021deb8e091a6a1a077010824f31b6d5bf.zip
r2038: get rid of the optimisation in the dcerpc server that tries to avoid a
data copy by playing internal games with DATA_BLOB and free(). (This used to be commit 5894b5c0f32f75734151c6c915b296204b7825ac)
-rw-r--r--source4/rpc_server/dcerpc_server.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index c243d7e4f9..f7c4689590 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -856,32 +856,6 @@ NTSTATUS dcesrv_input(struct dcesrv_connection *dce_conn, const DATA_BLOB *data)
{
NTSTATUS status;
- /* handle the very common case that the input contains a full packet and there
- is no partial packet pending. In this case we can avoid a copy of the
- data */
- if (dce_conn->partial_input.length == 0) {
- dce_conn->partial_input = *data;
- /* make sure that dce_partial_advance doesn't free this data */
- dce_conn->partial_input.free = NULL;
- while (dce_full_packet(&dce_conn->partial_input)) {
- status = dcesrv_input_process(dce_conn);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
- }
- if (dce_conn->partial_input.length) {
- /* there was some data left over. We have to copy this
- as the caller may free the data */
- dce_conn->partial_input =
- data_blob(dce_conn->partial_input.data,
- dce_conn->partial_input.length);
- if (!dce_conn->partial_input.data) {
- return NT_STATUS_NO_MEMORY;
- }
- }
- return NT_STATUS_OK;
- }
-
dce_conn->partial_input.data = Realloc(dce_conn->partial_input.data,
dce_conn->partial_input.length + data->length);
if (!dce_conn->partial_input.data) {