[libvirt] [PATCH] Fix comment about GNUTLS initialization/cleanup

Richard W.M. Jones rjones at redhat.com
Tue Apr 10 12:19:22 UTC 2012


On Tue, Apr 10, 2012 at 12:16:19PM +0100, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> ---
>  src/rpc/virnettlscontext.c |   10 +++++++---
>  1 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/src/rpc/virnettlscontext.c b/src/rpc/virnettlscontext.c
> index 74a61e0..7440c7a 100644
> --- a/src/rpc/virnettlscontext.c
> +++ b/src/rpc/virnettlscontext.c
> @@ -1423,9 +1423,13 @@ void virNetTLSSessionFree(virNetTLSSessionPtr sess)
>   * virNetTLS* because it initializes
>   * underlying GnuTLS library. According to
>   * it's documentation, it's safe to be called
> - * many times, but is not thread safe. Each
> - * call SHOULD be later followed by
> - * virNetTLSContextDeinit.
> + * many times, but is not thread safe.
> + *
> + * There is no corresponding "Deinit" / "Cleanup"
> + * function because there is no safe way to call
> + * 'gnutls_global_deinit' from a multi-threaded
> + * library, where other libraries linked into the
> + * application may also be using gnutls.
>   */
>  void virNetTLSInit(void)
>  {
> -- 
> 1.7.7.6

ACK, removes confusion ...

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora




More information about the libvir-list mailing list