summaryrefslogtreecommitdiffstats
path: root/source/libads/ldap_printer.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-07-20 15:35:29 +0000
committerGerald Carter <jerry@samba.org>2005-07-20 15:35:29 +0000
commit5445664d829d8d544b7c5d5cc412f7823464f382 (patch)
treeb47fc8933aa95a41c564255bd52d1d8b57283531 /source/libads/ldap_printer.c
parent51e2e72c68eff619cc5c9f5b46e4a5bd5a58adfd (diff)
downloadsamba-5445664d829d8d544b7c5d5cc412f7823464f382.tar.gz
samba-5445664d829d8d544b7c5d5cc412f7823464f382.tar.xz
samba-5445664d829d8d544b7c5d5cc412f7823464f382.zip
r8654: merging cli_spoolss_XX() updates from trunk
Diffstat (limited to 'source/libads/ldap_printer.c')
-rw-r--r--source/libads/ldap_printer.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/source/libads/ldap_printer.c b/source/libads/ldap_printer.c
index 68e67358910..6b053f8b4a3 100644
--- a/source/libads/ldap_printer.c
+++ b/source/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",