summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-11-09 14:49:26 +0000
committerGerald Carter <jerry@samba.org>2002-11-09 14:49:26 +0000
commitcda79e5d36711317f055f3724c354fec000be86a (patch)
tree0afcb1b3b48f7d8f569460d342ebf0a9bf5e5b06 /source3/rpcclient
parent2d08c914d782087ab0360aed9387ec1524d273d6 (diff)
downloadsamba-cda79e5d36711317f055f3724c354fec000be86a.tar.gz
samba-cda79e5d36711317f055f3724c354fec000be86a.tar.bz2
samba-cda79e5d36711317f055f3724c354fec000be86a.zip
deldriver fix
(This used to be commit 78ff2cc34aedaf82d965a71e0c9dfdeb86a90fdd)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_spoolss.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 4b5c6676e8..83096a3632 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -1259,16 +1259,21 @@ static NTSTATUS cmd_spoolss_deletedriver(struct cli_state *cli,
result = cli_spoolss_deleteprinterdriver(
cli, mem_ctx, archi_table[i].long_archi, argv[1]);
- if (!W_ERROR_IS_OK(result)) {
- printf ("Failed to remove driver %s for arch [%s] - error 0x%x!\n",
- argv[1], archi_table[i].long_archi,
- W_ERROR_V(result));
- } else
+ 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",
+ argv[1], archi_table[i].long_archi,
+ W_ERROR_V(result));
+ }
+ }
+ else
+ {
printf ("Driver %s removed for arch [%s].\n", argv[1],
archi_table[i].long_archi);
+ }
}
- return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
+ return W_ERROR_IS_OK(result) || W_ERROR_EQUAL(result, WERR_UNKNOWN_PRINTER_DRIVER) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
}
static NTSTATUS cmd_spoolss_getprintprocdir(struct cli_state *cli,