s4:librpc/rpc: force printing in dcerpc_bh_do_ndr_print() log level >= 11
authorStefan Metzmacher <metze@samba.org>
Tue, 17 Feb 2015 07:38:36 +0000 (08:38 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 26 Oct 2016 09:20:13 +0000 (11:20 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source4/librpc/rpc/dcerpc.c

index 0614eae46c29280abbfc8742d6bc9862b47d0044..edb4e7e852c284d21212a55b912ed284d5d16afe 100644 (file)
@@ -441,9 +441,24 @@ static void dcerpc_bh_do_ndr_print(struct dcerpc_binding_handle *h,
        struct dcerpc_bh_state *hs = dcerpc_binding_handle_data(h,
                                     struct dcerpc_bh_state);
        void *struct_ptr = discard_const(_struct_ptr);
+       bool print_in = false;
+       bool print_out = false;
+
+       if (hs->p->conn->flags & DCERPC_DEBUG_PRINT_IN) {
+               print_in = true;
+       }
+
+       if (hs->p->conn->flags & DCERPC_DEBUG_PRINT_OUT) {
+               print_out = true;
+       }
+
+       if (DEBUGLEVEL >= 11) {
+               print_in = true;
+               print_out = true;
+       }
 
        if (ndr_flags & NDR_IN) {
-               if (hs->p->conn->flags & DCERPC_DEBUG_PRINT_IN) {
+               if (print_in) {
                        ndr_print_function_debug(call->ndr_print,
                                                 call->name,
                                                 ndr_flags,
@@ -451,7 +466,7 @@ static void dcerpc_bh_do_ndr_print(struct dcerpc_binding_handle *h,
                }
        }
        if (ndr_flags & NDR_OUT) {
-               if (hs->p->conn->flags & DCERPC_DEBUG_PRINT_OUT) {
+               if (print_out) {
                        ndr_print_function_debug(call->ndr_print,
                                                 call->name,
                                                 ndr_flags,