diff options
author | Günther Deschner <gd@samba.org> | 2009-03-09 15:58:11 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-03-13 09:25:22 +0100 |
commit | 7876d28d9a738768bfce6050d26d5f6c2668c28d (patch) | |
tree | 217dad2eeeee865e872cfb74d0d83e9f301452ad | |
parent | 915c5939260cfa7c0000e18667f49de2a5f6c175 (diff) | |
download | samba-7876d28d9a738768bfce6050d26d5f6c2668c28d.tar.gz samba-7876d28d9a738768bfce6050d26d5f6c2668c28d.tar.bz2 samba-7876d28d9a738768bfce6050d26d5f6c2668c28d.zip |
s3-net: use rpccli_spoolss_enumprinterdrivers wrapper.
Guenther
-rw-r--r-- | source3/utils/net_rpc_printer.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c index 950ca72ed8..43d6460a98 100644 --- a/source3/utils/net_rpc_printer.c +++ b/source3/utils/net_rpc_printer.c @@ -978,16 +978,19 @@ static bool net_spoolss_enumforms(struct rpc_pipe_client *pipe_hnd, static bool net_spoolss_enumprinterdrivers (struct rpc_pipe_client *pipe_hnd, TALLOC_CTX *mem_ctx, uint32 level, const char *env, - uint32 *num_drivers, - PRINTER_DRIVER_CTR *ctr) + uint32 *count, + union spoolss_DriverInfo **info) { WERROR result; /* enumprinterdrivers call */ - result = rpccli_spoolss_enumprinterdrivers( - pipe_hnd, mem_ctx, level, - env, num_drivers, ctr); - + result = rpccli_spoolss_enumprinterdrivers(pipe_hnd, mem_ctx, + pipe_hnd->srv_name_slash, + env, + level, + 0, + count, + info); if (!W_ERROR_IS_OK(result)) { printf("cannot enum drivers: %s\n", win_errstr(result)); return false; @@ -1213,11 +1216,9 @@ NTSTATUS rpc_printer_driver_list_internals(struct net_context *c, NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; uint32 i; uint32 level = 3; - PRINTER_DRIVER_CTR drv_ctr_enum; + union spoolss_DriverInfo *info; int d; - ZERO_STRUCT(drv_ctr_enum); - printf("listing printer-drivers\n"); for (i=0; archi_table[i].long_archi!=NULL; i++) { @@ -1227,7 +1228,7 @@ NTSTATUS rpc_printer_driver_list_internals(struct net_context *c, /* enum remote drivers */ if (!net_spoolss_enumprinterdrivers(pipe_hnd, mem_ctx, level, archi_table[i].long_archi, - &num_drivers, &drv_ctr_enum)) { + &num_drivers, &info)) { nt_status = NT_STATUS_UNSUCCESSFUL; goto done; } @@ -1244,7 +1245,7 @@ NTSTATUS rpc_printer_driver_list_internals(struct net_context *c, /* do something for all drivers for architecture */ for (d = 0; d < num_drivers; d++) { - display_print_driver_3(&(drv_ctr_enum.info3[d])); + display_print_driver3(&info[d].info3); } } |