[PATCH] Fix comment about GNUTLS initialization/cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]