Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cups-browsed.c: Make NotifLeaseDuration configurable and renew after …
…half the lease duration not 60 sec before end 1) NotifLeaseDuration directive for cups-browsed.conf - it will make lease duration for notifications configurable by users. IMO it is not useful for regular users, but it is helpful during sanity testing (for verifying that we actually renew the subscription when time comes). The current hardcoded 1 day is unusuable for that :( . I implemented the lowest threshold to 300s to prevent a possible DoS. 2) Subscription renewal is set to happen in the middle of NotifLeaseDuration, not one minute before lease expiration. This was a problem on busy servers, where cups-browsed was busy and wasn't able to renew the subscription before cupsd removed it. Then if some jobs had come before the subscription was created again, the queue got disabled. The proposed approach is based on behavior of DHCP.
- Loading branch information
Showing
3 changed files
with
32 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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