Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scheduler: Fix cupsd activated on-demand via socket #988

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

zdohnal
Copy link
Member

@zdohnal zdohnal commented Jun 17, 2024

If only the expected cups.sock is set as listener in cupsd.conf, the array Listeners was NULL. To prevent copying the code, do the array allocation earlier and have only one check for Listeners, in service_checkin() which is run every time cupsd starts.

Fixes #985

Copy link
Member

@michaelrsweet michaelrsweet left a comment

Choose a reason for hiding this comment

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

Thanks for figuring this out - it didn't occur to me to make sure the Listeners array was allocated... Once you address my two comments this is ready to go.

scheduler/conf.c Show resolved Hide resolved
scheduler/conf.c Show resolved Hide resolved
@Maryse47
Copy link

I can confirm this fixes reported issue.

If only the expected cups.sock is set as listener in cupsd.conf, the
array Listeners was NULL. To prevent copying the code, do the array
allocation earlier and have only one check for Listeners, in
service_checkin() which is run every time cupsd starts.

Fixes OpenPrinting#985
@zdohnal zdohnal merged commit cd13b3e into OpenPrinting:2.4.x Jun 18, 2024
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants