From: Günther Deschner Date: Fri, 7 May 2010 20:54:08 +0000 (+0200) Subject: pidl: add NDR_PRINT_DEBUG output to generated s3 server dispatch tables. X-Git-Tag: samba-3.6.0pre1~2166 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0798ddf63a72e4259ce406ac199490eb5cb1f359;p=thirdparty%2Fsamba.git 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 --- diff --git a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm index 7c9091ea94e..057dca6c50c 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 "}";