summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-03-04 15:34:22 +0100
committerGünther Deschner <gd@samba.org>2010-03-05 15:17:59 +0100
commit37ca9288d2631b48a8eb50c01d6c0cc462d8ee31 (patch)
tree5962c511690c33b024224369239813b477548517 /source3
parent9a934832797c3e72859770719e05d19a5eefa14d (diff)
downloadsamba-37ca9288d2631b48a8eb50c01d6c0cc462d8ee31.tar.gz
samba-37ca9288d2631b48a8eb50c01d6c0cc462d8ee31.tar.bz2
samba-37ca9288d2631b48a8eb50c01d6c0cc462d8ee31.zip
s3-net: fix net after spoolss_SetPrinterData{Ex} IDL change.
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_rpc_printer.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c
index d1d38e8e00..20770835f7 100644
--- a/source3/utils/net_rpc_printer.c
+++ b/source3/utils/net_rpc_printer.c
@@ -832,7 +832,8 @@ static bool net_spoolss_setprinterdata(struct rpc_pipe_client *pipe_hnd,
struct policy_handle *hnd,
const char *value_name,
enum winreg_Type type,
- union spoolss_PrinterData data)
+ uint8_t *data,
+ uint32_t offered)
{
WERROR result;
NTSTATUS status;
@@ -843,7 +844,7 @@ static bool net_spoolss_setprinterdata(struct rpc_pipe_client *pipe_hnd,
value_name,
type,
data,
- 0, /* autocalculated */
+ offered,
&result);
if (!W_ERROR_IS_OK(result)) {
@@ -910,15 +911,6 @@ static bool net_spoolss_setprinterdataex(struct rpc_pipe_client *pipe_hnd,
{
WERROR result;
NTSTATUS status;
- union spoolss_PrinterData data;
- DATA_BLOB blob;
-
- blob = data_blob_const(value->data_p, value->size);
-
- result = pull_spoolss_PrinterData(mem_ctx, &blob, &data, value->type);
- if (!W_ERROR_IS_OK(result)) {
- return false;
- }
/* setprinterdataex call */
status = rpccli_spoolss_SetPrinterDataEx(pipe_hnd, mem_ctx,
@@ -926,8 +918,8 @@ static bool net_spoolss_setprinterdataex(struct rpc_pipe_client *pipe_hnd,
keyname,
value->valuename,
value->type,
- data,
- 0,
+ value->data_p,
+ value->size,
&result);
if (!W_ERROR_IS_OK(result)) {
@@ -2359,8 +2351,6 @@ NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
if (NT_STATUS_IS_OK(nt_status) && W_ERROR_IS_OK(result)) {
struct regval_blob v;
- DATA_BLOB blob;
- union spoolss_PrinterData printer_data;
/* display_value */
if (c->opt_verbose) {
@@ -2371,18 +2361,10 @@ NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
display_reg_value(SPOOL_PRINTERDATA_KEY, v);
}
- result = pull_spoolss_PrinterData(mem_ctx,
- &blob,
- &printer_data,
- type);
- if (!W_ERROR_IS_OK(result)) {
- goto done;
- }
-
/* set_value */
if (!net_spoolss_setprinterdata(pipe_hnd_dst, mem_ctx,
&hnd_dst, value_name,
- type, printer_data))
+ type, buffer, data_offered))
goto done;
DEBUGADD(1,("\tSetPrinterData of [%s] succeeded\n",