istopwg / ippeveselfcert

IPP Everywhere Printer Self-Certification Tools
https://www.pwg.org/ipp/everywhere.html
Apache License 2.0
21 stars 6 forks source link

Self-Certification Tool categorizes A3 printer as A4 one #84

Closed taikiarai closed 2 years ago

taikiarai commented 2 years ago

Hi,

OKI engineer has found an issue that Self-Certification Tool mistakenly categorizes A3 printer (with no finisher supported) as A4 one. The versions we chacked are v1.1 Update 4 (Beta) and Update3. (I think the former one also includes this issue because the code has not been updated recetly)

As OKI printer is not always supported finisher, the engineer considers that the value "finishings_supported->first_child" is used in line494 so that the line 496-505 are skipped.

Please see the code below in line487-507 and find the attached file "ippevesubmit.c.png". https://github.com/istopwg/ippeveselfcert/blob/master/tools/ippevesubmit.c ippevesubmit c

Could you please investigate more and fix it? In addition, why is finishings_supported value seen in line494?

What we expect is that A3 printer with no finisher is categorized A3 one exactly. Thank you. Cheers.

wifiprintguy commented 2 years ago

It seems like line 494 ought to be initializing the loop using media_supported, not finishings_supported, like so:

for (value = media_supported->first_child; value; value = value->next_sibling)

Also, if the media sizes aren't listed smallest to largest, then if the last one is smaller than a previous one, it could be that the media_format might switch from MEDIA_FORMAT_LARGE to MEDIA_FORMAT_MEDIUM, which isn't desirable.

michaelrsweet commented 2 years ago

I think the logic is correct, we just need to loop on the right values... :)

I will confirm with some unsorted test data that the logic works as expected.

michaelrsweet commented 2 years ago

[master 7a30fc0] Fix media size categories (Issue #84)

taikiarai commented 2 years ago

Hi,

It works well on sw-ippeveselfcert11-20220429-windows.msi.

Thank you. Cheers.