]> git.ipfire.org Git - thirdparty/cups.git/commit
Expand whitelist for use of "offline-report" 264/head
authorSolomon Peachy <pizza@shaftnet.org>
Thu, 30 Sep 2021 11:25:46 +0000 (07:25 -0400)
committerSolomon Peachy <pizza@shaftnet.org>
Thu, 30 Sep 2021 11:51:02 +0000 (07:51 -0400)
commitfc01abc1732d387ef54dd7450d97b84cc02b1b71
tree2fc334bceadd8ab189aefdcee6eadbefa882db87
parentd256aab4ba7ae8a382a3aa2cf24ed703c4bd3f47
Expand whitelist for use of "offline-report"

The old behavior unconditionally cleared the "offline-report"
printer-reason unless the backend was 'usb:' or 'ippusb:' with the
assumption that these were the only two direct-connect USB backends
in use, with everything else being remote.

This is definitely not the case; putting aside proprietary 3rd-party
backends, there is Gutenprint's USB backend, which identifies itself
with 'gutenprint52+usb:' or 'gutenprint53+usb:' depending on the version.

So, generalize the rule to search for the string 'usb:' in the uri
instead, which will allow all three/four usb backends to use the
'offline-report' printer-reason.

(FWIW, I'm not happy with this approach; It seems to me that the
 CorrectSolution(tm) is to track the device-class returned by the backend
 at discovery time, and ignore 'offline-report' for anything other than
 'direct', but that's going to be a lot more involved..)
scheduler/job.c