From 2a74f8bdbb28d7e027abfc703bd81c74eee38daf Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 9 Feb 2009 01:49:40 +0100 Subject: s3-rpcclient: use rpccli_spoolss_DeletePrinterDriver. Guenther --- source3/rpcclient/cmd_spoolss.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index 64d87e012c..f3cc5b1848 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -1562,6 +1562,7 @@ static WERROR cmd_spoolss_deletedriver(struct rpc_pipe_client *cli, int argc, const char **argv) { WERROR result = WERR_OK; + NTSTATUS status; fstring servername; int i; @@ -1577,9 +1578,14 @@ static WERROR cmd_spoolss_deletedriver(struct rpc_pipe_client *cli, /* delete the driver for all architectures */ for (i=0; archi_table[i].long_archi; i++) { /* make the call to remove the driver */ - result = rpccli_spoolss_deleteprinterdriver( - cli, mem_ctx, archi_table[i].long_archi, argv[1]); - + status = rpccli_spoolss_DeletePrinterDriver(cli, mem_ctx, + servername, + archi_table[i].long_archi, + argv[1], + &result); + if (!NT_STATUS_IS_OK(status)) { + return result; + } if ( !W_ERROR_IS_OK(result) ) { if ( !W_ERROR_EQUAL(result, WERR_UNKNOWN_PRINTER_DRIVER) ) { printf ("Failed to remove driver %s for arch [%s] - error 0x%x!\n", -- cgit