From 0798ddf63a72e4259ce406ac199490eb5cb1f359 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 7 May 2010 22:54:08 +0200 Subject: pidl: add NDR_PRINT_DEBUG output to generated s3 server dispatch tables. This dramatically helps tracking and debugging usage of the rpc_pipe_open_internal users. Guenther --- pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm') diff --git a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm index 7c9091ea94..057dca6c50 100644 --- a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm +++ b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm @@ -243,8 +243,18 @@ sub ParseDispatchFunction($) pidl "case $op: {"; indent; pidl "struct $fn->{NAME} *r = (struct $fn->{NAME} *)_r;"; + + pidl "if (DEBUGLEVEL >= 10) {"; + pidl "\tNDR_PRINT_IN_DEBUG($fn->{NAME}, r);"; + pidl "}"; + CallWithStruct("cli->pipes_struct", "mem_ctx", $fn, sub { pidl "\treturn NT_STATUS_NO_MEMORY;"; }); + + pidl "if (DEBUGLEVEL >= 10) {"; + pidl "\tNDR_PRINT_OUT_DEBUG($fn->{NAME}, r);"; + pidl "}"; + pidl "return NT_STATUS_OK;"; deindent; pidl "}"; -- cgit