s3:rpc_server: minor refactoring of process_request_pdu()
authorGregor Beck <gbeck@sernet.de>
Thu, 9 Jan 2014 09:15:31 +0000 (10:15 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 10 Feb 2014 07:53:31 +0000 (08:53 +0100)
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/rpc_server/srv_pipe.c

index 3f6f3dc38e6cb9413bc5915a667466a9afbd943c..e5bd3a7adeff126b32717d03a8408848bbd956dc 100644 (file)
@@ -1485,24 +1485,19 @@ static bool process_request_pdu(struct pipes_struct *p, struct ncacn_packet *pkt
                }
        }
 
-       if (pkt->pfc_flags & DCERPC_PFC_FLAG_LAST) {
-               bool ret = False;
-               /*
-                * Ok - we finally have a complete RPC stream.
-                * Call the rpc command to process it.
-                */
-
-               /*
-                * Process the complete data stream here.
-                */
-               if (pipe_init_outgoing_data(p)) {
-                       ret = api_pipe_request(p, pkt);
-               }
+       if (!(pkt->pfc_flags & DCERPC_PFC_FLAG_LAST)) {
+               return true;
+       }
 
-               return ret;
+       /*
+        * Ok - we finally have a complete RPC stream.
+        * Call the rpc command to process it.
+        */
+       if (!pipe_init_outgoing_data(p)) {
+               return false;
        }
 
-       return True;
+       return api_pipe_request(p, pkt);
 }
 
 void process_complete_pdu(struct pipes_struct *p, struct ncacn_packet *pkt)