summaryrefslogtreecommitdiff
path: root/source3/rpc_client/ndr.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-11-07 10:28:40 +0100
committerVolker Lendecke <vl@samba.org>2009-11-07 11:07:37 +0100
commit5cdee7ae0565c08026b8845cd3090b20d8abc472 (patch)
treeee58c10311c9996d7116a74f4260525e891568f0 /source3/rpc_client/ndr.c
parent843be3bcd9b07ba937944aee206bd4ecdfd65504 (diff)
downloadsamba-5cdee7ae0565c08026b8845cd3090b20d8abc472.tar.gz
samba-5cdee7ae0565c08026b8845cd3090b20d8abc472.tar.bz2
samba-5cdee7ae0565c08026b8845cd3090b20d8abc472.zip
s3: Do the printing for DEBUGLEVEL>=10 centrally
12 insertions(+), 10651 deletions(-) I think that says it all :-)
Diffstat (limited to 'source3/rpc_client/ndr.c')
-rw-r--r--source3/rpc_client/ndr.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/rpc_client/ndr.c b/source3/rpc_client/ndr.c
index f9af2f5f7a..6433a7d196 100644
--- a/source3/rpc_client/ndr.c
+++ b/source3/rpc_client/ndr.c
@@ -59,6 +59,11 @@ struct tevent_req *cli_do_rpc_ndr_send(TALLOC_CTX *mem_ctx,
state->r = r;
state->call = &table->calls[opnum];
+ if (DEBUGLEVEL >= 10) {
+ ndr_print_function_debug(state->call->ndr_print,
+ state->call->name, NDR_IN, r);
+ }
+
push = ndr_push_init_ctx(talloc_tos(), NULL);
if (tevent_req_nomem(push, req)) {
return tevent_req_post(req, ev);
@@ -136,7 +141,13 @@ NTSTATUS cli_do_rpc_ndr_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
ndr_err = state->call->ndr_pull(pull, NDR_OUT, state->r);
TALLOC_FREE(pull);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ if (DEBUGLEVEL >= 10) {
+ ndr_print_function_debug(state->call->ndr_print,
+ state->call->name, NDR_OUT,
+ state->r);
+ }
+ } else {
return ndr_map_error2ntstatus(ndr_err);
}