summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_spoolss_nt.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-09-07 19:12:59 +0000
committerJeremy Allison <jra@samba.org>2000-09-07 19:12:59 +0000
commit6ef7bf0eac2ca8838322ffc92704fe275b19ec6f (patch)
treed53ac3d8365f45395cbb9808b1e258d5d9b65c19 /source3/rpc_server/srv_spoolss_nt.c
parent45d30f72ffc48ed06907f8eba1beed61be81f783 (diff)
downloadsamba-6ef7bf0eac2ca8838322ffc92704fe275b19ec6f.tar.gz
samba-6ef7bf0eac2ca8838322ffc92704fe275b19ec6f.tar.bz2
samba-6ef7bf0eac2ca8838322ffc92704fe275b19ec6f.zip
Added code to return NO_MORE_ENTRIES when trying to determine
size using "NT mega hack". I think this is the correct thing to do but JF should also examine the. Jeremy. (This used to be commit 29ba3a2cdf7f6fbcf0be41b75d76c04007cd4651)
Diffstat (limited to 'source3/rpc_server/srv_spoolss_nt.c')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index d73fc649dd..8e5c48271b 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -4540,6 +4540,18 @@ uint32 _spoolss_enumprinterdata(POLICY_HND *handle, uint32 idx,
param_index++;
}
+ /*
+ * I think this is correct, it doesn't break APW and
+ * allows Gerald's Win32 test programs to work correctly,
+ * but may need altering.... JRA.
+ */
+
+ if (param_index == 0) {
+ /* No parameters found. */
+ free_a_printer(&printer, 2);
+ return ERROR_NO_MORE_ITEMS;
+ }
+
/* the value is an UNICODE string but realvaluesize is the length in bytes including the leading 0 */
*out_value_len=2*(1+biggest_valuesize);
*out_data_len=biggest_datasize;