summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-09 11:14:00 +0100
committerGünther Deschner <gd@samba.org>2009-02-09 12:34:03 +0100
commitcae89f5250d7bc6f06db456c5e733c40175bcb78 (patch)
tree68ed705fd1deb223e00e2d20f8a8ddbfe89e6f2a /source3
parent160e8c7a3779b263130469bffb168d142a7cd708 (diff)
downloadsamba-cae89f5250d7bc6f06db456c5e733c40175bcb78.tar.gz
samba-cae89f5250d7bc6f06db456c5e733c40175bcb78.tar.bz2
samba-cae89f5250d7bc6f06db456c5e733c40175bcb78.zip
s3-rpcclient: use rpccli_spoolss_DeletePrinterDriverEx.
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/rpcclient/cmd_spoolss.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index f3cc5b1848..7138e8b9e3 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -1504,12 +1504,14 @@ static WERROR cmd_spoolss_deletedriverex(struct rpc_pipe_client *cli,
int argc, const char **argv)
{
WERROR result, ret = WERR_UNKNOWN_PRINTER_DRIVER;
-
+ NTSTATUS status;
+
int i;
int vers = -1;
const char *arch = NULL;
-
+ uint32_t delete_flags = 0;
+
/* parse the command arguments */
if (argc < 2 || argc > 4) {
printf ("Usage: %s <driver> [arch] [version]\n", argv[0]);
@@ -1520,8 +1522,11 @@ static WERROR cmd_spoolss_deletedriverex(struct rpc_pipe_client *cli,
arch = argv[2];
if (argc == 4)
vers = atoi (argv[3]);
-
-
+
+ if (vers >= 0) {
+ delete_flags |= DPD_DELETE_SPECIFIC_VERSION;
+ }
+
/* delete the driver for all architectures */
for (i=0; archi_table[i].long_archi; i++) {
@@ -1532,8 +1537,13 @@ static WERROR cmd_spoolss_deletedriverex(struct rpc_pipe_client *cli,
continue;
/* make the call to remove the driver */
- result = rpccli_spoolss_deleteprinterdriverex(
- cli, mem_ctx, archi_table[i].long_archi, argv[1], archi_table[i].version);
+ status = rpccli_spoolss_DeletePrinterDriverEx(cli, mem_ctx,
+ cli->srv_name_slash,
+ archi_table[i].long_archi,
+ argv[1],
+ delete_flags,
+ archi_table[i].version,
+ &result);
if ( !W_ERROR_IS_OK(result) )
{