summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc/rpc_echo.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-18 01:18:24 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-18 01:18:24 +0000
commit2c0a7165efb1ce52be27bd13496e99c5e5c70e48 (patch)
treea959c8bdd0ac3bb0378d91bbfe68a16858bbc6dc /source4/librpc/rpc/rpc_echo.c
parent7b185ccb32d685c00ddca9495fafe34bec59ceb3 (diff)
downloadsamba-2c0a7165efb1ce52be27bd13496e99c5e5c70e48.tar.gz
samba-2c0a7165efb1ce52be27bd13496e99c5e5c70e48.tar.bz2
samba-2c0a7165efb1ce52be27bd13496e99c5e5c70e48.zip
* use the new auto-generated debug code method.
* add a couple more info levels to wkssvc (This used to be commit c69161bdb13745f271b0cfa9a9af349f7a95edc6)
Diffstat (limited to 'source4/librpc/rpc/rpc_echo.c')
-rw-r--r--source4/librpc/rpc/rpc_echo.c102
1 files changed, 81 insertions, 21 deletions
diff --git a/source4/librpc/rpc/rpc_echo.c b/source4/librpc/rpc/rpc_echo.c
index b7e3bf4e7c..38b394dbf6 100644
--- a/source4/librpc/rpc/rpc_echo.c
+++ b/source4/librpc/rpc/rpc_echo.c
@@ -1,44 +1,104 @@
-/* dcerpc client calls auto-generated by pidl */
+/* dcerpc client calls generated by pidl */
#include "includes.h"
NTSTATUS dcerpc_echo_AddOne(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct echo_AddOne *r)
{
- return dcerpc_ndr_request(p, DCERPC_ECHO_ADDONE, mem_ctx,
- (ndr_push_fn_t) ndr_push_echo_AddOne,
- (ndr_pull_fn_t) ndr_pull_echo_AddOne,
- r);
+ NTSTATUS status;
+
+ if (p->flags & DCERPC_DEBUG_PRINT_IN) {
+ NDR_PRINT_IN_DEBUG(echo_AddOne, r);
+ }
+
+ status = dcerpc_ndr_request(p, DCERPC_ECHO_ADDONE, mem_ctx,
+ (ndr_push_fn_t) ndr_push_echo_AddOne,
+ (ndr_pull_fn_t) ndr_pull_echo_AddOne,
+ r);
+
+ if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG(echo_AddOne, r);
+ }
+
+ return status;
}
NTSTATUS dcerpc_echo_EchoData(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct echo_EchoData *r)
{
- return dcerpc_ndr_request(p, DCERPC_ECHO_ECHODATA, mem_ctx,
- (ndr_push_fn_t) ndr_push_echo_EchoData,
- (ndr_pull_fn_t) ndr_pull_echo_EchoData,
- r);
+ NTSTATUS status;
+
+ if (p->flags & DCERPC_DEBUG_PRINT_IN) {
+ NDR_PRINT_IN_DEBUG(echo_EchoData, r);
+ }
+
+ status = dcerpc_ndr_request(p, DCERPC_ECHO_ECHODATA, mem_ctx,
+ (ndr_push_fn_t) ndr_push_echo_EchoData,
+ (ndr_pull_fn_t) ndr_pull_echo_EchoData,
+ r);
+
+ if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG(echo_EchoData, r);
+ }
+
+ return status;
}
NTSTATUS dcerpc_echo_SinkData(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct echo_SinkData *r)
{
- return dcerpc_ndr_request(p, DCERPC_ECHO_SINKDATA, mem_ctx,
- (ndr_push_fn_t) ndr_push_echo_SinkData,
- (ndr_pull_fn_t) ndr_pull_echo_SinkData,
- r);
+ NTSTATUS status;
+
+ if (p->flags & DCERPC_DEBUG_PRINT_IN) {
+ NDR_PRINT_IN_DEBUG(echo_SinkData, r);
+ }
+
+ status = dcerpc_ndr_request(p, DCERPC_ECHO_SINKDATA, mem_ctx,
+ (ndr_push_fn_t) ndr_push_echo_SinkData,
+ (ndr_pull_fn_t) ndr_pull_echo_SinkData,
+ r);
+
+ if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG(echo_SinkData, r);
+ }
+
+ return status;
}
NTSTATUS dcerpc_echo_SourceData(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct echo_SourceData *r)
{
- return dcerpc_ndr_request(p, DCERPC_ECHO_SOURCEDATA, mem_ctx,
- (ndr_push_fn_t) ndr_push_echo_SourceData,
- (ndr_pull_fn_t) ndr_pull_echo_SourceData,
- r);
+ NTSTATUS status;
+
+ if (p->flags & DCERPC_DEBUG_PRINT_IN) {
+ NDR_PRINT_IN_DEBUG(echo_SourceData, r);
+ }
+
+ status = dcerpc_ndr_request(p, DCERPC_ECHO_SOURCEDATA, mem_ctx,
+ (ndr_push_fn_t) ndr_push_echo_SourceData,
+ (ndr_pull_fn_t) ndr_pull_echo_SourceData,
+ r);
+
+ if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG(echo_SourceData, r);
+ }
+
+ return status;
}
NTSTATUS dcerpc_TestCall(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct TestCall *r)
{
- return dcerpc_ndr_request(p, DCERPC_TESTCALL, mem_ctx,
- (ndr_push_fn_t) ndr_push_TestCall,
- (ndr_pull_fn_t) ndr_pull_TestCall,
- r);
+ NTSTATUS status;
+
+ if (p->flags & DCERPC_DEBUG_PRINT_IN) {
+ NDR_PRINT_IN_DEBUG(TestCall, r);
+ }
+
+ status = dcerpc_ndr_request(p, DCERPC_TESTCALL, mem_ctx,
+ (ndr_push_fn_t) ndr_push_TestCall,
+ (ndr_pull_fn_t) ndr_pull_TestCall,
+ r);
+
+ if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG(TestCall, r);
+ }
+
+ return status;
}