Skip to content

Fix saving of empty "marker-message" values to printers.conf. - #1757

Merged
michaelrsweet merged 1 commit into
OpenPrinting:masterfrom
toppk:fix-empty-marker-message
Oct 12, 2026
Merged

michaelrsweet merged 1 commit into
OpenPrinting:masterfrom
toppk:fix-empty-marker-message

Conversation

@toppk

@toppk toppk commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

This PR was written by an AI assistant (Claude), working with and reviewed by @toppk.

Issue: When a printer reports an empty marker-message, cupsdSaveAllPrinters() writes Attribute marker-message to printers.conf. cupsFileGetConf() strips the trailing space, so on the next start cupsdLoadAllPrinters() logs Syntax error on line N of printers.conf. The next job writes the line again, so the error comes back after every restart. We hit this with a driverless IPP printer (Dell E525w) on 2.4.19.

Fix: Save an empty message as Attribute marker-message "". The existing loader already parses this as an empty string, so the load code doesn't change, and older cupsd versions read the file without error. There are other ways to handle this, such as skipping the line or relaxing the loader. This is the smallest change.

Tested by saving and reloading printers.conf with master and a patched 2.4.19.

🤖 Generated with Claude Code

@michaelrsweet michaelrsweet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@michaelrsweet michaelrsweet self-assigned this Oct 12, 2026
@michaelrsweet michaelrsweet added the bug Something isn't working label Oct 12, 2026
@michaelrsweet michaelrsweet added this to the v2.5 milestone Oct 12, 2026
@michaelrsweet
michaelrsweet merged commit 6fa960b into OpenPrinting:master Oct 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants