s3-net: fix net_spoolss_setprinterdata.
authorGünther Deschner <gd@samba.org>
Mon, 16 Mar 2009 23:34:59 +0000 (00:34 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 17 Mar 2009 11:10:43 +0000 (12:10 +0100)
Guenther

source3/utils/net_rpc_printer.c

index 695b16c3dc1c361f0fc048ae8585eeb923ad5b6c..a30b3a1d0e0a85a3ace16cc61283532cf2b594b7 100644 (file)
@@ -815,17 +815,23 @@ static bool net_spoolss_setprinter(struct rpc_pipe_client *pipe_hnd,
 
 
 static bool net_spoolss_setprinterdata(struct rpc_pipe_client *pipe_hnd,
-                                       TALLOC_CTX *mem_ctx,
-                                       POLICY_HND *hnd,
-                                       REGISTRY_VALUE *value)
+                                      TALLOC_CTX *mem_ctx,
+                                      struct policy_handle *hnd,
+                                      const char *value_name,
+                                      enum winreg_Type type,
+                                      union spoolss_PrinterData data)
 {
        WERROR result;
-
-       /* FIXME - GD */
-       return true;
+       NTSTATUS status;
 
        /* setprinterdata call */
-       /* result = rpccli_spoolss_setprinterdata(pipe_hnd, mem_ctx, hnd, value); */
+       status = rpccli_spoolss_SetPrinterData(pipe_hnd, mem_ctx,
+                                              hnd,
+                                              value_name,
+                                              type,
+                                              data,
+                                              0, /* autocalculated */
+                                              &result);
 
        if (!W_ERROR_IS_OK(result)) {
                printf ("unable to set printerdata: %s\n", win_errstr(result));