s4:librpc/rpc: print out the NDR_OUT for async requests
authorStefan Metzmacher <metze@samba.org>
Sat, 19 Sep 2009 22:56:38 +0000 (00:56 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 29 Sep 2009 06:33:34 +0000 (08:33 +0200)
metze

source4/librpc/rpc/dcerpc.c

index 87d44384ce5541465162eb5a4f6ba2eb9544f550..571cae504617b7a07b468ce6ba32592f28c3f9df 100644 (file)
@@ -1448,6 +1448,7 @@ _PUBLIC_ NTSTATUS dcerpc_ndr_request_recv(struct rpc_request *req)
        const struct ndr_interface_table *table = req->ndr.table;
        const struct ndr_interface_call *call = &table->calls[opnum];
        enum ndr_err_code ndr_err;
+       bool async = req->async_call;
 
        /* make sure the recv code doesn't free the request, as we
           need to grab the flags element before it is freed */
@@ -1515,6 +1516,9 @@ _PUBLIC_ NTSTATUS dcerpc_ndr_request_recv(struct rpc_request *req)
        }
 
        /* TODO: make pull context independent from the output mem_ctx and free the pull context */
+       if (async && p->conn->flags & DCERPC_DEBUG_PRINT_OUT) {
+               ndr_print_function_debug(call->ndr_print, call->name, NDR_OUT, r);
+       }
 
        return NT_STATUS_OK;
 }