Author: tridge
Date: 2004-10-28 11:59:03 +0000 (Thu, 28 Oct 2004)
New Revision: 3320

WebSVN: 
http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/rpc_server&rev=3320&nolog=1

Log:
fixed bugs in the rpc_server code in handling partial packet receives and sends
it now passes the non-blocking test suite


Modified:
   branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c
   branches/SAMBA_4_0/source/rpc_server/dcerpc_sock.c


Changeset:
Modified: branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c        2004-10-28 11:58:09 
UTC (rev 3319)
+++ branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c        2004-10-28 11:59:03 
UTC (rev 3320)
@@ -907,7 +907,6 @@
        struct dcesrv_call_state *call;
        struct dcesrv_call_reply *rep;
        ssize_t nwritten;
-       NTSTATUS status = NT_STATUS_OK;
 
        call = dce_conn->call_list;
        if (!call || !call->replies) {
@@ -928,8 +927,6 @@
        if (rep->data.length == 0) {
                /* we're done with this section of the call */
                DLIST_REMOVE(call->replies, rep);
-       } else {
-               status = STATUS_BUFFER_OVERFLOW;
        }
 
        if (call->replies == NULL) {
@@ -938,7 +935,7 @@
                talloc_free(call);
        }
 
-       return status;
+       return NT_STATUS_OK;
 }
 
 

Modified: branches/SAMBA_4_0/source/rpc_server/dcerpc_sock.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/dcerpc_sock.c  2004-10-28 11:58:09 UTC (rev 
3319)
+++ branches/SAMBA_4_0/source/rpc_server/dcerpc_sock.c  2004-10-28 11:59:03 UTC (rev 
3320)
@@ -39,7 +39,7 @@
        size_t sendlen;
 
        status = socket_send(sock, out, &sendlen, 0);
-       if (!NT_STATUS_IS_OK(status)) {
+       if (NT_STATUS_IS_ERR(status)) {
                return -1;
        }
 
@@ -265,6 +265,7 @@
                return;
        }
        if (nread == 0) {
+               talloc_free(tmp_blob.data);
                return;
        }
 

Reply via email to