From ecafd3754f35a2109a3a1eecbbdd72ade06b8502 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 20 Jul 2005 15:35:29 +0000 Subject: r8654: merging cli_spoolss_XX() updates from trunk (This used to be commit cd961e50a3029898868d21263ccacb7d5f1f07b9) --- source3/libads/ldap_printer.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'source3/libads') diff --git a/source3/libads/ldap_printer.c b/source3/libads/ldap_printer.c index 68e6735891..6b053f8b4a 100644 --- a/source3/libads/ldap_printer.c +++ b/source3/libads/ldap_printer.c @@ -267,7 +267,7 @@ WERROR get_remote_printer_publishing_data(struct cli_state *cli, char *printername, *servername; REGVAL_CTR dsdriver_ctr, dsspooler_ctr; BOOL got_dsdriver = False, got_dsspooler = False; - uint32 needed, i; + uint32 i; POLICY_HND pol; asprintf(&servername, "\\\\%s", cli->desthost); @@ -286,14 +286,7 @@ WERROR get_remote_printer_publishing_data(struct cli_state *cli, return result; } - result = cli_spoolss_enumprinterdataex(cli, mem_ctx, 0, &needed, - &pol, SPOOL_DSDRIVER_KEY, NULL); - - if (W_ERROR_V(result) == ERRmoredata) - result = cli_spoolss_enumprinterdataex(cli, mem_ctx, needed, - NULL, &pol, - SPOOL_DSDRIVER_KEY, - &dsdriver_ctr); + result = cli_spoolss_enumprinterdataex(cli, mem_ctx, &pol, SPOOL_DSDRIVER_KEY, NULL); if (!W_ERROR_IS_OK(result)) { DEBUG(3, ("Unable to do enumdataex on %s, error is %s.\n", @@ -307,15 +300,7 @@ WERROR get_remote_printer_publishing_data(struct cli_state *cli, dsdriver_ctr.values[i]); } - result = cli_spoolss_enumprinterdataex(cli, mem_ctx, 0, &needed, - &pol, SPOOL_DSSPOOLER_KEY, - NULL); - - if (W_ERROR_V(result) == ERRmoredata) - result = cli_spoolss_enumprinterdataex(cli, mem_ctx, needed, - NULL, &pol, - SPOOL_DSSPOOLER_KEY, - &dsspooler_ctr); + result = cli_spoolss_enumprinterdataex(cli, mem_ctx, &pol, SPOOL_DSSPOOLER_KEY, NULL); if (!W_ERROR_IS_OK(result)) { DEBUG(3, ("Unable to do enumdataex on %s, error is %s.\n", -- cgit