diff options
author | Günther Deschner <gd@samba.org> | 2009-03-20 16:02:48 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-03-25 12:46:40 +0100 |
commit | 283e135298767f128c413e0e6df75d21ec8e8e6b (patch) | |
tree | b76ca05f9e37fca61897a6113823a97b2c6d6786 /source3/rpc_server | |
parent | ad98eae02e623a8ca8aa6a1c46d5aedea50e2e4b (diff) | |
download | samba-283e135298767f128c413e0e6df75d21ec8e8e6b.tar.gz samba-283e135298767f128c413e0e6df75d21ec8e8e6b.tar.bz2 samba-283e135298767f128c413e0e6df75d21ec8e8e6b.zip |
s3-spoolss: implement enumprinters_level0.
Guenther
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index a8d414b85e..15c137a88c 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -4245,6 +4245,10 @@ static WERROR enum_all_printers_info_level(TALLOC_CTX *mem_ctx, } switch (level) { + case 0: + result = construct_printer_info0(info, ntprinter, + &info[count].info0, snum); + break; case 1: result = construct_printer_info1(info, ntprinter, flags, &info[count].info1, snum); @@ -4291,6 +4295,22 @@ static WERROR enum_all_printers_info_level(TALLOC_CTX *mem_ctx, } /******************************************************************** + * handle enumeration of printers at level 0 + ********************************************************************/ + +static WERROR enumprinters_level0(TALLOC_CTX *mem_ctx, + uint32_t flags, + const char *servername, + union spoolss_PrinterInfo **info, + uint32_t *count) +{ + DEBUG(4,("enum_all_printers_info_0\n")); + + return enum_all_printers_info_level(mem_ctx, 0, flags, info, count); +} + + +/******************************************************************** ********************************************************************/ static WERROR enum_all_printers_info_1(TALLOC_CTX *mem_ctx, @@ -4513,6 +4533,10 @@ WERROR _spoolss_EnumPrinters(pipes_struct *p, W_ERROR_HAVE_NO_MEMORY(name); switch (r->in.level) { + case 0: + result = enumprinters_level0(p->mem_ctx, r->in.flags, name, + r->out.info, r->out.count); + break; case 1: result = enumprinters_level1(p->mem_ctx, r->in.flags, name, r->out.info, r->out.count); |