diff options
Diffstat (limited to 'source3/printing')
-rw-r--r-- | source3/printing/printspoolss.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/source3/printing/printspoolss.c b/source3/printing/printspoolss.c index 7a730a55bb..acf4c0d19a 100644 --- a/source3/printing/printspoolss.c +++ b/source3/printing/printspoolss.c @@ -64,7 +64,8 @@ NTSTATUS print_spool_open(files_struct *fsp, struct print_file_data *pf; struct dcerpc_binding_handle *b = NULL; struct spoolss_DevmodeContainer devmode_ctr; - union spoolss_DocumentInfo info; + struct spoolss_DocumentInfoCtr info_ctr; + struct spoolss_DocumentInfo1 *info1; int fd = -1; WERROR werr; @@ -173,17 +174,23 @@ NTSTATUS print_spool_open(files_struct *fsp, goto done; } - info.info1 = talloc(tmp_ctx, struct spoolss_DocumentInfo1); - if (!info.info1) { + info1 = talloc(tmp_ctx, struct spoolss_DocumentInfo1); + if (info1 == NULL) { status = NT_STATUS_NO_MEMORY; goto done; } - info.info1->document_name = pf->docname; - info.info1->output_file = pf->filename; - info.info1->datatype = "RAW"; + info1->document_name = pf->docname; + info1->output_file = pf->filename; + info1->datatype = "RAW"; - status = dcerpc_spoolss_StartDocPrinter(b, tmp_ctx, &pf->handle, - 1, info, &pf->jobid, &werr); + info_ctr.level = 1; + info_ctr.info.info1 = info1; + + status = dcerpc_spoolss_StartDocPrinter(b, tmp_ctx, + &pf->handle, + &info_ctr, + &pf->jobid, + &werr); if (!NT_STATUS_IS_OK(status)) { goto done; } |