summaryrefslogtreecommitdiff
path: root/source3/libads/ldap_printer.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-07-20 15:35:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:00:14 -0500
commitecafd3754f35a2109a3a1eecbbdd72ade06b8502 (patch)
treed442ae80d7f93acd21ae2a4d35fcfc3c0f80f3e6 /source3/libads/ldap_printer.c
parentb0f1c8df1641bf0e1c53750f4cc126d7b1e21159 (diff)
downloadsamba-ecafd3754f35a2109a3a1eecbbdd72ade06b8502.tar.gz
samba-ecafd3754f35a2109a3a1eecbbdd72ade06b8502.tar.bz2
samba-ecafd3754f35a2109a3a1eecbbdd72ade06b8502.zip
r8654: merging cli_spoolss_XX() updates from trunk
(This used to be commit cd961e50a3029898868d21263ccacb7d5f1f07b9)
Diffstat (limited to 'source3/libads/ldap_printer.c')
-rw-r--r--source3/libads/ldap_printer.c21
1 files changed, 3 insertions, 18 deletions
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",