From 588d802877ec5c1969d8f0a79875382bfa91c032 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 8 Sep 2000 21:24:45 +0000 Subject: Fixed up get_a_printer_driver_3 so it looks in the tdb using the correct key name for a driver info. Version needs to be adjusted in the same way that it is adjusted when the driver info is stored in the tdb. AddPrinterConnection() Win32 call caught this one. Jeremy. (This used to be commit 54cab7dd3b7c1ad3a01692447f80134518772486) --- source3/printing/nt_printing.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source3/printing') diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index f6c85ab3f9..a39ca39778 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -775,6 +775,17 @@ static uint32 get_a_printer_driver_3(NT_PRINTER_DRIVER_INFO_LEVEL_3 **info_ptr, get_short_archi(architecture, in_arch); + /* + * Note - the version sent here for Win2k is probably (3). Due to the + * hack done in clean_up_driver_struct_level_3() we need to + * do the same hack so we can find the correctly stored driver. JRA. + */ + + if (StrCaseCmp(in_arch, "Windows 4.0")==0) + version=0; + else + version=2; + DEBUG(8,("get_a_printer_driver_3: [%s%s/%d/%s]\n", DRIVERS_PREFIX, architecture, version, in_prt)); slprintf(key, sizeof(key), "%s%s/%d/%s", DRIVERS_PREFIX, architecture, version, in_prt); -- cgit