summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-12-07 11:54:26 +0100
committerGünther Deschner <gd@samba.org>2009-12-07 14:42:13 +0100
commitc85ed0054e67413ffcd169c405ee4feda3555628 (patch)
tree3d13cb804d379b85c5da7cc58ef495f42bb13955 /source3/rpcclient
parent123d8d1c2c8ea214fa1a216c92ca1a3fc1b4d6d0 (diff)
downloadsamba-c85ed0054e67413ffcd169c405ee4feda3555628.tar.gz
samba-c85ed0054e67413ffcd169c405ee4feda3555628.tar.bz2
samba-c85ed0054e67413ffcd169c405ee4feda3555628.zip
s3: fix net and rpcclient after setprinterdataex changes.
Guenther
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_spoolss.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index e24fb99e6f..5393ba75a9 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -864,10 +864,9 @@ static WERROR cmd_spoolss_getprinterdataex(struct rpc_pipe_client *cli,
NTSTATUS status;
fstring printername;
const char *valuename, *keyname;
- struct regval_blob value;
enum winreg_Type type;
- uint8_t *buffer = NULL;
+ union spoolss_PrinterData data;
uint32_t offered = 0;
uint32_t needed;
@@ -903,21 +902,20 @@ static WERROR cmd_spoolss_getprinterdataex(struct rpc_pipe_client *cli,
&pol,
keyname,
valuename,
- &type,
- buffer,
offered,
+ &type,
+ &data,
&needed,
&result);
if (W_ERROR_EQUAL(result, WERR_MORE_DATA)) {
offered = needed;
- buffer = talloc_array(mem_ctx, uint8_t, needed);
status = rpccli_spoolss_GetPrinterDataEx(cli, mem_ctx,
&pol,
keyname,
valuename,
- &type,
- buffer,
offered,
+ &type,
+ &data,
&needed,
&result);
}
@@ -926,22 +924,13 @@ static WERROR cmd_spoolss_getprinterdataex(struct rpc_pipe_client *cli,
goto done;
}
- if (!W_ERROR_IS_OK(result)) {
- goto done;
- }
-
-
if (!W_ERROR_IS_OK(result))
goto done;
/* Display printer data */
- fstrcpy(value.valuename, valuename);
- value.type = type;
- value.size = needed;
- value.data_p = buffer;
+ display_printer_data(valuename, type, &data);
- display_reg_value(value);
done:
if (is_valid_policy_hnd(&pol))