From 6ef7bf0eac2ca8838322ffc92704fe275b19ec6f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 7 Sep 2000 19:12:59 +0000 Subject: 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) --- source3/rpc_server/srv_spoolss_nt.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source3') 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; -- cgit