From 9b80349a2f93feac560dc6b3d99dcf2cecb4e635 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 14 Aug 2003 20:51:41 +0000 Subject: fix bug 294; win9x driver lookups should always use version 0 (This used to be commit 8cc1a49c13b24e8fe501caa0d7d695d34a58d08d) --- source3/printing/nt_printing.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'source3/printing') diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 5e6e95ff7e..2596d99815 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -204,13 +204,19 @@ struct table_node { int version; }; +#define SPL_ARCH_WIN40 "WIN40" +#define SPL_ARCH_W32X86 "W32X86" +#define SPL_ARCH_W32MIPS "W32MIPS" +#define SPL_ARCH_W32ALPHA "W32ALPHA" +#define SPL_ARCH_W32PPC "W32PPC" + static const struct table_node archi_table[]= { - {"Windows 4.0", "WIN40", 0 }, - {"Windows NT x86", "W32X86", 2 }, - {"Windows NT R4000", "W32MIPS", 2 }, - {"Windows NT Alpha_AXP", "W32ALPHA", 2 }, - {"Windows NT PowerPC", "W32PPC", 2 }, + {"Windows 4.0", SPL_ARCH_WIN40, 0 }, + {"Windows NT x86", SPL_ARCH_W32X86, 2 }, + {"Windows NT R4000", SPL_ARCH_W32MIPS, 2 }, + {"Windows NT Alpha_AXP", SPL_ARCH_W32ALPHA, 2 }, + {"Windows NT PowerPC", SPL_ARCH_W32PPC, 2 }, {NULL, "", -1 } }; @@ -1755,6 +1761,11 @@ static WERROR get_a_printer_driver_3(NT_PRINTER_DRIVER_INFO_LEVEL_3 **info_ptr, ZERO_STRUCT(driver); architecture = get_short_archi(arch); + + /* Windows 4.0 (i.e. win9x) should always use a version of 0 */ + + if ( strcmp( arch, SPL_ARCH_WIN40 ) == 0 ) + version = 0; DEBUG(8,("get_a_printer_driver_3: [%s%s/%d/%s]\n", DRIVERS_PREFIX, architecture, version, drivername)); -- cgit