diff options
author | Günther Deschner <gd@samba.org> | 2010-02-13 03:45:25 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-02-18 15:47:59 +0100 |
commit | 0a8011aa98ccaa81dc6ba2d30672ef4856fc31d8 (patch) | |
tree | 483d4866bbbd9baccf62bfd16c533e1a273cb2d5 | |
parent | 28817424935e5b6eaf465fe993dedc2b0a0cf177 (diff) | |
download | samba-0a8011aa98ccaa81dc6ba2d30672ef4856fc31d8.tar.gz samba-0a8011aa98ccaa81dc6ba2d30672ef4856fc31d8.tar.bz2 samba-0a8011aa98ccaa81dc6ba2d30672ef4856fc31d8.zip |
spoolss: use ndr_push_spoolss_PrinterInfo2 hand-marshalled version (moves devmode relative pointer down to sd).
Guenther
-rw-r--r-- | librpc/gen_ndr/ndr_spoolss.c | 237 | ||||
-rw-r--r-- | librpc/gen_ndr/spoolss.h | 2 | ||||
-rw-r--r-- | librpc/idl/spoolss.idl | 2 | ||||
-rw-r--r-- | librpc/ndr/ndr_spoolss_buf.c | 237 |
4 files changed, 239 insertions, 239 deletions
diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c index 2a903850f1..112e993006 100644 --- a/librpc/gen_ndr/ndr_spoolss.c +++ b/librpc/gen_ndr/ndr_spoolss.c @@ -1484,243 +1484,6 @@ _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo1(const struct spoolss_PrinterInfo1 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo1, ic); } -_PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo2 *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 5)); - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_relative_ptr1(ndr, r->servername)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printername)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_relative_ptr1(ndr, r->sharename)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_relative_ptr1(ndr, r->portname)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_relative_ptr1(ndr, r->drivername)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_relative_ptr1(ndr, r->comment)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_relative_ptr1(ndr, r->location)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_spoolss_DeviceMode = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4); - NDR_CHECK(ndr_push_relative_ptr1(ndr, r->devmode)); - ndr->flags = _flags_save_spoolss_DeviceMode; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_relative_ptr1(ndr, r->sepfile)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printprocessor)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_relative_ptr1(ndr, r->datatype)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_relative_ptr1(ndr, r->parameters)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_spoolss_security_descriptor = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4); - NDR_CHECK(ndr_push_relative_ptr1(ndr, r->secdesc)); - ndr->flags = _flags_save_spoolss_security_descriptor; - } - NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->defaultpriority)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->starttime)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->untiltime)); - NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cjobs)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->averageppm)); - NDR_CHECK(ndr_push_trailer_align(ndr, 5)); - } - if (ndr_flags & NDR_BUFFERS) { - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - if (r->servername) { - NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->servername)); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->servername)); - NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->servername)); - } - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - if (r->printername) { - NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->printername)); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printername)); - NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->printername)); - } - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - if (r->sharename) { - NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->sharename)); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->sharename)); - NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->sharename)); - } - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - if (r->portname) { - NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->portname)); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->portname)); - NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->portname)); - } - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - if (r->drivername) { - NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->drivername)); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->drivername)); - NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->drivername)); - } - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - if (r->comment) { - NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->comment)); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->comment)); - NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->comment)); - } - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - if (r->location) { - NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->location)); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->location)); - NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->location)); - } - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_spoolss_DeviceMode = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4); - if (r->devmode) { - NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->devmode)); - { - struct ndr_push *_ndr_devmode; - NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_devmode, 0, -1)); - NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode)); - NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_devmode, 0, -1)); - } - NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->devmode)); - } - ndr->flags = _flags_save_spoolss_DeviceMode; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - if (r->sepfile) { - NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->sepfile)); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->sepfile)); - NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->sepfile)); - } - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - if (r->printprocessor) { - NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->printprocessor)); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printprocessor)); - NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->printprocessor)); - } - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - if (r->datatype) { - NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->datatype)); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->datatype)); - NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->datatype)); - } - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - if (r->parameters) { - NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->parameters)); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->parameters)); - NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->parameters)); - } - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_spoolss_security_descriptor = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4); - if (r->secdesc) { - NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->secdesc)); - { - struct ndr_push *_ndr_secdesc; - NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_secdesc, 0, -1)); - NDR_CHECK(ndr_push_spoolss_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc)); - NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_secdesc, 0, -1)); - } - NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->secdesc)); - } - ndr->flags = _flags_save_spoolss_security_descriptor; - } - } - return NDR_ERR_SUCCESS; -} - _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo2 *r) { uint32_t _ptr_servername; diff --git a/librpc/gen_ndr/spoolss.h b/librpc/gen_ndr/spoolss.h index 7c69f57c0d..945453c359 100644 --- a/librpc/gen_ndr/spoolss.h +++ b/librpc/gen_ndr/spoolss.h @@ -831,7 +831,7 @@ struct spoolss_PrinterInfo2 { uint32_t status; uint32_t cjobs; uint32_t averageppm; -}/* [gensize,public] */; +}/* [gensize,public,nopush] */; struct spoolss_PrinterInfo3 { struct spoolss_security_descriptor *secdesc;/* [relative,subcontext(0),flag(LIBNDR_FLAG_ALIGN4)] */ diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl index 48162097cc..377ef5ee4f 100644 --- a/librpc/idl/spoolss.idl +++ b/librpc/idl/spoolss.idl @@ -468,7 +468,7 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor") [relative] nstring *comment; } spoolss_PrinterInfo1; - typedef [public,gensize] struct { + typedef [public,gensize,nopush] struct { [relative] nstring *servername; [relative] nstring *printername; [relative] nstring *sharename; diff --git a/librpc/ndr/ndr_spoolss_buf.c b/librpc/ndr/ndr_spoolss_buf.c index 14503a0aab..a616aad0c2 100644 --- a/librpc/ndr/ndr_spoolss_buf.c +++ b/librpc/ndr/ndr_spoolss_buf.c @@ -1464,3 +1464,240 @@ enum ndr_err_code ndr_push_spoolss_security_descriptor(struct ndr_push *ndr, int } return NDR_ERR_SUCCESS; } + +_PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo2 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 5)); + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_relative_ptr1(ndr, r->servername)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printername)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_relative_ptr1(ndr, r->sharename)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_relative_ptr1(ndr, r->portname)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_relative_ptr1(ndr, r->drivername)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_relative_ptr1(ndr, r->comment)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_relative_ptr1(ndr, r->location)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_spoolss_DeviceMode = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4); + NDR_CHECK(ndr_push_relative_ptr1(ndr, r->devmode)); + ndr->flags = _flags_save_spoolss_DeviceMode; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_relative_ptr1(ndr, r->sepfile)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printprocessor)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_relative_ptr1(ndr, r->datatype)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_relative_ptr1(ndr, r->parameters)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_spoolss_security_descriptor = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4); + NDR_CHECK(ndr_push_relative_ptr1(ndr, r->secdesc)); + ndr->flags = _flags_save_spoolss_security_descriptor; + } + NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->defaultpriority)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->starttime)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->untiltime)); + NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cjobs)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->averageppm)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); + } + if (ndr_flags & NDR_BUFFERS) { + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + if (r->servername) { + NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->servername)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->servername)); + NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->servername)); + } + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + if (r->printername) { + NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->printername)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printername)); + NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->printername)); + } + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + if (r->sharename) { + NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->sharename)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->sharename)); + NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->sharename)); + } + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + if (r->portname) { + NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->portname)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->portname)); + NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->portname)); + } + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + if (r->drivername) { + NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->drivername)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->drivername)); + NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->drivername)); + } + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + if (r->comment) { + NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->comment)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->comment)); + NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->comment)); + } + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + if (r->location) { + NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->location)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->location)); + NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->location)); + } + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + if (r->sepfile) { + NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->sepfile)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->sepfile)); + NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->sepfile)); + } + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + if (r->printprocessor) { + NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->printprocessor)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printprocessor)); + NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->printprocessor)); + } + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + if (r->datatype) { + NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->datatype)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->datatype)); + NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->datatype)); + } + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + if (r->parameters) { + NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->parameters)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->parameters)); + NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->parameters)); + } + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_spoolss_DeviceMode = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4); + if (r->devmode) { + NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->devmode)); + { + struct ndr_push *_ndr_devmode; + NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_devmode, 0, -1)); + NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode)); + NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_devmode, 0, -1)); + } + NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->devmode)); + } + ndr->flags = _flags_save_spoolss_DeviceMode; + } + { + uint32_t _flags_save_spoolss_security_descriptor = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4); + if (r->secdesc) { + NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->secdesc)); + { + struct ndr_push *_ndr_secdesc; + NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_secdesc, 0, -1)); + NDR_CHECK(ndr_push_spoolss_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc)); + NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_secdesc, 0, -1)); + } + NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->secdesc)); + } + ndr->flags = _flags_save_spoolss_security_descriptor; + } + } + return NDR_ERR_SUCCESS; +} |