OpenPrinting / cups

OpenPrinting CUPS Sources
https://openprinting.github.io/cups
Apache License 2.0
1.08k stars 193 forks source link

Fix delays printing to lpd when reserved ports are exhausted #741

Closed bmasonrh closed 1 year ago

bmasonrh commented 1 year ago

cups_rresvport() doesn't reserve ports less than 512; however, lpd_queue() continues decrementing the port number to 0. This leads to delays of ~511 seconds once all ports between 512-1023 are exhausted. Even when ports become available, lpd_queue() still tries calling cups_rresvport() with port numbers less than 512, waiting one second between each call.