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)
committerKarolin Seeger <kseeger@samba.org>
Tue, 1 Apr 2014 07:26:40 +0000 (09:26 +0200)
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit b5f30205931a4b9d0b3b257d5855869e606f8b63)

source3/rpc_server/srv_pipe.c

index 894f12c2e906090ecba5b8c25008f88b26d90591..a5b74edf07b8177d7a2befa6ca40c00d33bb5730 100644 (file)
@@ -1561,24 +1561,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);
 }
 
 /****************************************************************************