Skip to content

tls-gnutls.c: Do not check for errno after I/O operations#1507

Merged
michaelrsweet merged 1 commit intoOpenPrinting:masterfrom
zdohnal:tls-gnutls-dont-check-errno
Mar 5, 2026
Merged

tls-gnutls.c: Do not check for errno after I/O operations#1507
michaelrsweet merged 1 commit intoOpenPrinting:masterfrom
zdohnal:tls-gnutls-dont-check-errno

Conversation

@zdohnal
Copy link
Member

@zdohnal zdohnal commented Mar 5, 2026

Based on gnutls_record_send/recv man pages, we should use the return value of the functions as indicator what happened in the function and do not look into errno at all.

Checking the errno value caused infinity loop in cupsd on busy servers if there were enough connection errors when cupsd wrote the response.

The patch is provided by Paul Zirnik from SUSE - thank you for the patch!

Fixes #827

Based on gnutls_record_send/recv man pages, we should use the return
value of the functions as indicator what happened in the function and do
not look into errno at all.

Checking the errno value caused infinity loop in cupsd on busy servers
if there were enough connection errors when cupsd wrote the response.

The patch is provided by Paul Zirnik from SUSE - thank you for the
patch!

Fixes OpenPrinting#827
@zdohnal zdohnal requested a review from michaelrsweet March 5, 2026 13:18
@michaelrsweet michaelrsweet self-assigned this Mar 5, 2026
@michaelrsweet michaelrsweet added bug Something isn't working priority-low platform issue Issue is specific to an OS or desktop labels Mar 5, 2026
@michaelrsweet michaelrsweet added this to the v2.5 milestone Mar 5, 2026
@michaelrsweet michaelrsweet merged commit eb0b17b into OpenPrinting:master Mar 5, 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 platform issue Issue is specific to an OS or desktop priority-low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

endless poll loop in http_write when POLLHUP is returned

2 participants