- add 'print' to the DCERPC binding strings
[samba.git] / source4 / torture / rpc / echo.c
index 8d8a3d7c0c697727c1cc4ec656d5d058c132d5d4..cdae51393dcd66e4aa5b5f9c0af69d0ee8ee6fb7 100644 (file)
@@ -169,12 +169,12 @@ static BOOL test_sinkdata(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
 static BOOL test_testcall(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
 {
        NTSTATUS status;
-       struct TestCall r;
+       struct echo_TestCall r;
 
        r.in.s1 = "input string";
 
        printf("\nTesting TestCall\n");
-       status = dcerpc_TestCall(p, mem_ctx, &r);
+       status = dcerpc_echo_TestCall(p, mem_ctx, &r);
        if (!NT_STATUS_IS_OK(status)) {
                printf("TestCall failed - %s\n", nt_errstr(status));
                return False;
@@ -189,7 +189,7 @@ static BOOL test_testcall(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
 static BOOL test_testcall2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
 {
        NTSTATUS status;
-       struct TestCall2 r;
+       struct echo_TestCall2 r;
        int i;
        BOOL ret = True;
 
@@ -197,7 +197,7 @@ static BOOL test_testcall2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
                r.in.level = i;
 
                printf("\nTesting TestCall2 level %d\n", i);
-               status = dcerpc_TestCall2(p, mem_ctx, &r);
+               status = dcerpc_echo_TestCall2(p, mem_ctx, &r);
                if (!NT_STATUS_IS_OK(status)) {
                        printf("TestCall2 failed - %s\n", nt_errstr(status));
                        ret = False;
@@ -242,8 +242,6 @@ BOOL torture_rpc_echo(int dummy)
        }
 #endif
 
-       p->flags |= DCERPC_DEBUG_PRINT_BOTH;
-
        if (!test_testcall(p, mem_ctx)) {
                ret = False;
        }
@@ -254,6 +252,8 @@ BOOL torture_rpc_echo(int dummy)
 
        printf("\n");
        
+       talloc_destroy(mem_ctx);
+
         torture_rpc_close(p);
        return ret;
 }