s3-rpcclient: use rpccli_spoolss_DeletePrinterDriver.
authorGünther Deschner <gd@samba.org>
Mon, 9 Feb 2009 00:49:40 +0000 (01:49 +0100)
committerGünther Deschner <gd@samba.org>
Mon, 9 Feb 2009 11:34:03 +0000 (12:34 +0100)
Guenther

source3/rpcclient/cmd_spoolss.c

index 64d87e012c0a013d1673897cec80edc853567070..f3cc5b1848fea0fc960ec2e850c6d571befcfea6 100644 (file)
@@ -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",