scheduler: Fix typo in have_source check preventing default trays#1649
Open
hissamshar wants to merge 2 commits into
Open
scheduler: Fix typo in have_source check preventing default trays#1649hissamshar wants to merge 2 commits into
hissamshar wants to merge 2 commits into
Conversation
In commit 074526b, the logic for checking whether a job already specified a paper source was refactored into the `have_source` boolean. However, the De Morgan's inversion for the `HPPaperSource` attribute was accidentally written as `== NULL` instead of `!= NULL`. This caused `have_source` to erroneously evaluate to `true` for almost all print jobs (since normal jobs never include the proprietary `HPPaperSource` attribute). As a result, the scheduler assumed the client had explicitly requested a tray, causing it to skip mapping the queue's `DefaultInputSlot` into the outgoing job options. This commit corrects the operator so that `have_source` correctly evaluates to `false` when no tray is specified, allowing IPP Everywhere printers to successfully receive their default tray assignments. Fixes OpenPrinting#1636
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In commit 074526b, the logic for checking whether a job already specified a paper source was refactored into the
have_sourceboolean. However, the De Morgan's inversion for theHPPaperSourceattribute was accidentally written as== NULLinstead of!= NULL.This caused
have_sourceto erroneously evaluate totruefor almost all print jobs (since normal jobs never include the proprietaryHPPaperSourceattribute). As a result, the scheduler assumed the client had explicitly requested a tray, causing it to skip mapping the queue'sDefaultInputSlotinto the outgoing job options.This commit corrects the operator so that
have_sourcecorrectly evaluates tofalsewhen no tray is specified, allowing IPP Everywhere printers to successfully receive their default tray assignments.Fixes #1636