summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-01-16 10:37:48 +0100
committerGünther Deschner <gd@samba.org>2008-01-16 11:08:05 +0100
commit1bb220174fdefb36106124736eccd9c0a55d07d7 (patch)
treead37c59456421e9a425acfb2ea932802e003412a
parentb9d21dd668d3032643bf8d465d7b988de2d2f49a (diff)
downloadsamba-1bb220174fdefb36106124736eccd9c0a55d07d7.tar.gz
samba-1bb220174fdefb36106124736eccd9c0a55d07d7.tar.bz2
samba-1bb220174fdefb36106124736eccd9c0a55d07d7.zip
Avoid use of NDR_PRINT_X_DEBUG (that debugs with level 0) in libnetjoin.
Guenther (This used to be commit 357a393b106fe88629bf5f6c634d16c0fc47cee9)
-rw-r--r--source3/libnet/libnet_join.c41
1 files changed, 37 insertions, 4 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index a189a38ea3..49868192e8 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -24,6 +24,35 @@
/****************************************************************
****************************************************************/
+#define LIBNET_JOIN_DUMP_CTX(ctx, r, f) \
+ do { \
+ char *str = NULL; \
+ str = NDR_PRINT_FUNCTION_STRING(ctx, libnet_JoinCtx, f, r); \
+ DEBUG(1,("libnet_Join:\n%s", str)); \
+ talloc_free(str); \
+ } while (0)
+
+#define LIBNET_JOIN_IN_DUMP_CTX(ctx, r) \
+ LIBNET_JOIN_DUMP_CTX(ctx, r, NDR_IN | NDR_SET_VALUES)
+#define LIBNET_JOIN_OUT_DUMP_CTX(ctx, r) \
+ LIBNET_JOIN_DUMP_CTX(ctx, r, NDR_OUT)
+
+#define LIBNET_UNJOIN_DUMP_CTX(ctx, r, f) \
+ do { \
+ char *str = NULL; \
+ str = NDR_PRINT_FUNCTION_STRING(ctx, libnet_UnjoinCtx, f, r); \
+ DEBUG(1,("libnet_Unjoin:\n%s", str)); \
+ talloc_free(str); \
+ } while (0)
+
+#define LIBNET_UNJOIN_IN_DUMP_CTX(ctx, r) \
+ LIBNET_UNJOIN_DUMP_CTX(ctx, r, NDR_IN | NDR_SET_VALUES)
+#define LIBNET_UNJOIN_OUT_DUMP_CTX(ctx, r) \
+ LIBNET_UNJOIN_DUMP_CTX(ctx, r, NDR_OUT)
+
+/****************************************************************
+****************************************************************/
+
static void libnet_join_set_error_string(TALLOC_CTX *mem_ctx,
struct libnet_JoinCtx *r,
const char *format, ...)
@@ -1214,7 +1243,7 @@ WERROR libnet_Join(TALLOC_CTX *mem_ctx,
WERROR werr;
if (r->in.debug) {
- NDR_PRINT_IN_DEBUG(libnet_JoinCtx, r);
+ LIBNET_JOIN_IN_DUMP_CTX(mem_ctx, r);
}
werr = libnet_join_pre_processing(mem_ctx, r);
@@ -1234,8 +1263,10 @@ WERROR libnet_Join(TALLOC_CTX *mem_ctx,
goto done;
}
done:
+ r->out.result = werr;
+
if (r->in.debug) {
- NDR_PRINT_OUT_DEBUG(libnet_JoinCtx, r);
+ LIBNET_JOIN_OUT_DUMP_CTX(mem_ctx, r);
}
return werr;
}
@@ -1328,7 +1359,7 @@ WERROR libnet_Unjoin(TALLOC_CTX *mem_ctx,
WERROR werr;
if (r->in.debug) {
- NDR_PRINT_IN_DEBUG(libnet_UnjoinCtx, r);
+ LIBNET_UNJOIN_IN_DUMP_CTX(mem_ctx, r);
}
werr = libnet_unjoin_pre_processing(mem_ctx, r);
@@ -1349,8 +1380,10 @@ WERROR libnet_Unjoin(TALLOC_CTX *mem_ctx,
}
done:
+ r->out.result = werr;
+
if (r->in.debug) {
- NDR_PRINT_OUT_DEBUG(libnet_UnjoinCtx, r);
+ LIBNET_UNJOIN_OUT_DUMP_CTX(mem_ctx, r);
}
return werr;