diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-10-09 14:33:56 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:20:54 -0500 |
commit | 4ead8b391d9a1b20f2d06cf003a622fd913045e8 (patch) | |
tree | ae7199d61021291f7d012c619acf4342032d9f88 /source4/torture | |
parent | b0d8e2d42c115ce2a7639810b31302b6ec0585b8 (diff) | |
download | samba-4ead8b391d9a1b20f2d06cf003a622fd913045e8.tar.gz samba-4ead8b391d9a1b20f2d06cf003a622fd913045e8.tar.bz2 samba-4ead8b391d9a1b20f2d06cf003a622fd913045e8.zip |
r19205: Some consolidation
(This used to be commit 6991864a032b136c68190b0f86714cd6c0c14b9f)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/samba3rpc.c | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c index e10a9b54b7..24799d2a16 100644 --- a/source4/torture/rpc/samba3rpc.c +++ b/source4/torture/rpc/samba3rpc.c @@ -2369,7 +2369,6 @@ static NTSTATUS getprinterinfo(TALLOC_CTX *ctx, struct dcerpc_pipe *pipe, talloc_free(mem_ctx); return NT_STATUS_OK; } - BOOL torture_samba3_rpc_spoolss(struct torture_context *torture) { @@ -2447,15 +2446,9 @@ BOOL torture_samba3_rpc_spoolss(struct torture_context *torture) r.out.handle = &server_handle; status = dcerpc_spoolss_OpenPrinterEx(p, mem_ctx, &r); - if (!NT_STATUS_IS_OK(status)) { + if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(r.out.result)) { d_printf("(%s) dcerpc_spoolss_OpenPrinterEx failed: " - "%s\n", __location__, nt_errstr(status)); - talloc_free(mem_ctx); - return False; - } - if (!W_ERROR_IS_OK(r.out.result)) { - d_printf("(%s) dcerpc_spoolss_OpenPrinterEx failed: " - "%s\n", __location__, + "%s, %s\n", __location__, nt_errstr(status), win_errstr(r.out.result)); talloc_free(mem_ctx); return False; @@ -2469,15 +2462,9 @@ BOOL torture_samba3_rpc_spoolss(struct torture_context *torture) r.out.handle = &server_handle; status = dcerpc_spoolss_ClosePrinter(p, mem_ctx, &r); - if (!NT_STATUS_IS_OK(status)) { - d_printf("(%s) dcerpc_spoolss_ClosePrinter failed: " - "%s\n", __location__, nt_errstr(status)); - talloc_free(mem_ctx); - return False; - } - if (!W_ERROR_IS_OK(r.out.result)) { + if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(r.out.result)) { d_printf("(%s) dcerpc_spoolss_ClosePrinter failed: " - "%s\n", __location__, + "%s, %s\n", __location__, nt_errstr(status), win_errstr(r.out.result)); talloc_free(mem_ctx); return False; @@ -2497,15 +2484,9 @@ BOOL torture_samba3_rpc_spoolss(struct torture_context *torture) r.out.handle = &printer_handle; status = dcerpc_spoolss_OpenPrinterEx(p, mem_ctx, &r); - if (!NT_STATUS_IS_OK(status)) { - d_printf("(%s) dcerpc_spoolss_OpenPrinterEx failed: " - "%s\n", __location__, nt_errstr(status)); - talloc_free(mem_ctx); - return False; - } - if (!W_ERROR_IS_OK(r.out.result)) { + if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(r.out.result)) { d_printf("(%s) dcerpc_spoolss_OpenPrinterEx failed: " - "%s\n", __location__, + "%s, %s\n", __location__, nt_errstr(status), win_errstr(r.out.result)); talloc_free(mem_ctx); return False; |