diff options
author | Tim Potter <tpot@samba.org> | 2004-06-23 07:31:09 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:45 -0500 |
commit | a38429269edbad0a2a8aef9fd38f125a610bd639 (patch) | |
tree | 1d644752b1a84013c8bd0afed13f9093e6f6777d /source4 | |
parent | c400f8670795f9fe77e994493046e5cddc12fe05 (diff) | |
download | samba-a38429269edbad0a2a8aef9fd38f125a610bd639.tar.gz samba-a38429269edbad0a2a8aef9fd38f125a610bd639.tar.bz2 samba-a38429269edbad0a2a8aef9fd38f125a610bd639.zip |
r1226: Return dummy information for two printers. Note that ndr_push_array()
can be used here - neat!
(This used to be commit 5d0013438e6f838da44e6c7e74e4c49d477da3f1)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/rpc_server/spoolss/dcesrv_spoolss.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/source4/rpc_server/spoolss/dcesrv_spoolss.c b/source4/rpc_server/spoolss/dcesrv_spoolss.c index dbf3d4cb89..7efe9b2129 100644 --- a/source4/rpc_server/spoolss/dcesrv_spoolss.c +++ b/source4/rpc_server/spoolss/dcesrv_spoolss.c @@ -32,17 +32,24 @@ static WERROR spoolss_EnumPrinters(struct dcesrv_call_state *dce_call, TALLOC_CT struct spoolss_EnumPrinters *r) { struct ndr_push *buf; - struct spoolss_PrinterInfo1 info; + struct spoolss_PrinterInfo1 info[2]; WERROR result; - info.flags = 0; - info.name = "p"; - info.description = "a printer"; - info.comment = "a comment"; + info[0].flags = 0x80; + info[0].name = "p"; + info[0].description = "a printer"; + info[0].comment = "a comment"; + + info[1].flags = 0x80; + info[1].name = "p2"; + info[1].description = "spottyfoot"; + info[1].comment = "the doggy"; buf = ndr_push_init(); - ndr_push_spoolss_PrinterInfo1(buf, NDR_SCALARS|NDR_BUFFERS, &info); + ndr_push_array(buf, NDR_SCALARS|NDR_BUFFERS, info, + sizeof(struct spoolss_PrinterInfo1), 2, + (ndr_push_const_fn_t)ndr_push_spoolss_PrinterInfo1); if (*r->in.buf_size < buf->offset) { *r->out.buf_size = buf->offset; @@ -59,7 +66,7 @@ static WERROR spoolss_EnumPrinters(struct dcesrv_call_state *dce_call, TALLOC_CT *r->out.buffer = data_blob_talloc(mem_ctx, buf->data, buf->offset); - r->out.count = 1; + r->out.count = 2; *r->out.buf_size = buf->offset; result = WERR_OK; |