Skip to content

Commit fa91bdf

Browse files
authored
Use XML Make or Model for 1284DeviceID line if other info is missing (#11)
Windows 10 and 11 require 1284DeviceID to contain MFG and MDL elements, otherwise the shared printer would silently fail upon adding (or install endlessly, without any error). If the XML file does not have <autodetect> section, use general <make> and <model> data to construct 1284DeviceID.
1 parent 2e6f14b commit fa91bdf

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/Foomatic/DB.pm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4547,11 +4547,13 @@ sub deviceIDfromDBEntry {
45474547
my $pnpmake;
45484548
$pnpmake = $ieeemake or $pnpmake = $dat->{'general_mfg'} or
45494549
$pnpmake = $dat->{'pnp_mfg'} or $pnpmake = $dat->{'par_mfg'} or
4550-
$pnpmake = $dat->{'usb_mfg'} or $pnpmake = "";
4550+
$pnpmake = $dat->{'usb_mfg'} or $pnpmake = $dat->{'make'} or
4551+
$pnpmake = "";
45514552
my $pnpmodel;
45524553
$pnpmodel = $ieeemodel or $pnpmodel = $dat->{'general_mdl'} or
45534554
$pnpmodel = $dat->{'pnp_mdl'} or $pnpmodel = $dat->{'par_mdl'} or
4554-
$pnpmodel = $dat->{'usb_mdl'} or $pnpmodel = "";
4555+
$pnpmodel = $dat->{'usb_mdl'} or $pnpmodel = $dat->{'model'} or
4556+
$pnpmodel = "";
45554557
my $pnpcmd;
45564558
$pnpcmd = $ieeecmd or $pnpcmd = $dat->{'general_cmd'} or
45574559
$pnpcmd = $dat->{'pnp_cmd'} or $pnpcmd = $dat->{'par_cmd'} or

0 commit comments

Comments
 (0)