s3-rpcclient: fix rpcclient after spoolss_SetPrinterData{Ex} IDL change.
authorGünther Deschner <gd@samba.org>
Thu, 4 Mar 2010 14:34:49 +0000 (15:34 +0100)
committerGünther Deschner <gd@samba.org>
Fri, 5 Mar 2010 14:17:59 +0000 (15:17 +0100)
Guenther

source3/rpcclient/cmd_spoolss.c

index deecbc5164afb0c11f8c904f695fb5ab342624b2..8b7152152a6a0fbdba4472f52814e88f4d529abc 100644 (file)
@@ -2368,6 +2368,7 @@ static WERROR cmd_spoolss_setprinterdata(struct rpc_pipe_client *cli,
        union spoolss_PrinterInfo info;
        enum winreg_Type type;
        union spoolss_PrinterData data;
+       DATA_BLOB blob;
 
        /* parse the command arguments */
        if (argc < 5) {
@@ -2470,12 +2471,17 @@ static WERROR cmd_spoolss_setprinterdata(struct rpc_pipe_client *cli,
                goto done;
        }
 
+       result = push_spoolss_PrinterData(mem_ctx, &blob, type, &data);
+       if (!W_ERROR_IS_OK(result)) {
+               goto done;
+       }
+
        status = rpccli_spoolss_SetPrinterData(cli, mem_ctx,
                                               &pol,
                                               argv[3], /* value_name */
                                               type,
-                                              data,
-                                              0, /* autocalculated size */
+                                              blob.data,
+                                              blob.length,
                                               &result);
        if (!W_ERROR_IS_OK(result)) {
                printf ("Unable to set [%s=%s]!\n", argv[3], argv[4]);