diff options
author | Gerald Carter <jerry@samba.org> | 2000-07-18 05:07:28 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2000-07-18 05:07:28 +0000 |
commit | 17dba7ef057c65e60c9fbaf6535f2a745eeb6a2a (patch) | |
tree | 700c953006922b9ce883e7bc78e91a0cbd6e0bb5 /source3/rpc_client/msrpc_spoolss.c | |
parent | 2089176e346ffdc3b903448e15b58219c055ea4e (diff) | |
download | samba-17dba7ef057c65e60c9fbaf6535f2a745eeb6a2a.tar.gz samba-17dba7ef057c65e60c9fbaf6535f2a745eeb6a2a.tar.xz samba-17dba7ef057c65e60c9fbaf6535f2a745eeb6a2a.zip |
Fixed some more client SPOOLSS functions. The following
functions work now:
- spoolenum
- spoolopen
- spoolgetprinter
- spoolgetprinterdriver
Items todo:
- track down memory bug with spoolenumdata
- fix spoolgetprinterdriverdir
- fix spoolgetdata
- fix display_job_info_ctr in spooljobs
All part of the rpcclient work.
Jeremy, this check includes emthods for associating
POLICY_HNDs and client states. See the RpcHndList_...()
function calls (implemented in lib/util_list.c)
--jerry
(This used to be commit 84349394a988213724ca138e9692b3bc44fa0cb8)
Diffstat (limited to 'source3/rpc_client/msrpc_spoolss.c')
-rw-r--r-- | source3/rpc_client/msrpc_spoolss.c | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/source3/rpc_client/msrpc_spoolss.c b/source3/rpc_client/msrpc_spoolss.c index be0f59a8fef..d8379048cf4 100644 --- a/source3/rpc_client/msrpc_spoolss.c +++ b/source3/rpc_client/msrpc_spoolss.c @@ -209,21 +209,26 @@ BOOL msrpc_spoolss_enum_printers(char* srv_name, uint32 flags, if (status!=NT_STATUS_NO_PROBLEMO) return False; - switch (level) { - case 1: - decode_printer_info_1(&buffer, returned, &(ctr.printers_1)); - break; - case 2: - decode_printer_info_2(&buffer, returned, &(ctr.printers_2)); - break; - case 3: - decode_printer_info_3(&buffer, returned, &(ctr.printers_3)); - break; - } - - display_printer_info_ctr(out_hnd, ACTION_HEADER , level, returned, ctr); - display_printer_info_ctr(out_hnd, ACTION_ENUMERATE, level, returned, ctr); - display_printer_info_ctr(out_hnd, ACTION_FOOTER , level, returned, ctr); + /* is there anything to process? */ + if (returned != 0) + { + switch (level) { + case 1: + decode_printer_info_1(&buffer, returned, &(ctr.printers_1)); + break; + case 2: + decode_printer_info_2(&buffer, returned, &(ctr.printers_2)); + break; + case 3: + decode_printer_info_3(&buffer, returned, &(ctr.printers_3)); + break; + } + + display_printer_info_ctr(out_hnd, ACTION_HEADER , level, returned, ctr); + display_printer_info_ctr(out_hnd, ACTION_ENUMERATE, level, returned, ctr); + display_printer_info_ctr(out_hnd, ACTION_FOOTER , level, returned, ctr); + } + return True; } |