The maintainer of the prining system CUPS is not always open to things which are in other people's eyes useful or correct. Threfore I paste patches here, which are correct and useful but rejected upstream.
As CUPS calls gnutls_global_init() in httá¹—.c it's a bug that it doesn't call gnutls_global_deinit() anywhere else. Accorgind to http://linux.die.net/man/3/gnutls_global_init there should be a matching deinit() call. Tried to convince upstream via private mail - no way. :-)
This trivial Patch fixes it.
OpenLDAP has a LDAP_OPT_NETWORK_TIMEOUT which does for OpenLDAP that what real world CUPS users are looking for in CUPS here, here, here, here, or here. Samba started to work around the problem itself.
In the upstream bug report you can learn that this is a TCP problem.
Do you have other usefull patches for CUPS which you want to share with the world? Please send it to me, so I can add it here.
b j o e r n [at] j 3 e . d e