svn commit: samba r2038 - branches/SAMBA_4_0/source/rpc_server
tridge at samba.org
tridge at samba.org
Wed Aug 25 02:06:08 GMT 2004
Author: tridge
Date: 2004-08-25 02:06:08 +0000 (Wed, 25 Aug 2004)
New Revision: 2038
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/&rev=2038&nolog=1
Log:
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().
Modified:
branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c
Changeset:
Modified: branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c 2004-08-25 02:05:02 UTC (rev 2037)
+++ branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c 2004-08-25 02:06:08 UTC (rev 2038)
@@ -856,32 +856,6 @@
{
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) {
More information about the samba-cvs
mailing list