Author: bh
Date: 2007-07-24 18:57:21 +0200 (Tue, 24 Jul 2007)
New Revision: 309
Modified:
trunk/openvas-libraries/ChangeLog
trunk/openvas-libraries/libopenvas/network.c
Log:
* libopenvas/network.c (nessus_SSL_init): Make sure
gnutls_global_init is only called once even if nessus_SSL_init is
called multiple times.
Modified: trunk/openvas-libraries/ChangeLog
===================================================================
--- trunk/openvas-libraries/ChangeLog 2007-07-24 16:49:38 UTC (rev 308)
+++ trunk/openvas-libraries/ChangeLog 2007-07-24 16:57:21 UTC (rev 309)
@@ -1,5 +1,11 @@
2007-07-24 Bernhard Herzog <[EMAIL PROTECTED]>
+ * libopenvas/network.c (nessus_SSL_init): Make sure
+ gnutls_global_init is only called once even if nessus_SSL_init is
+ called multiple times.
+
+2007-07-24 Bernhard Herzog <[EMAIL PROTECTED]>
+
* libopenvas/network.c (load_file, unload_file): Use emalloc and
efree to be consistent with the rest of the libopenvas code
Modified: trunk/openvas-libraries/libopenvas/network.c
===================================================================
--- trunk/openvas-libraries/libopenvas/network.c 2007-07-24 16:49:38 UTC
(rev 308)
+++ trunk/openvas-libraries/libopenvas/network.c 2007-07-24 16:57:21 UTC
(rev 309)
@@ -342,6 +342,11 @@
ExtFunc int
nessus_SSL_init(char *path)
{
+ static int initialized = 0;
+
+ if (initialized)
+ return;
+
int ret = gnutls_global_init();
if (ret < 0)
{
@@ -349,6 +354,8 @@
return -1;
}
+ initialized = 1;
+
return 0;
}
_______________________________________________
Openvas-commits mailing list
[email protected]
http://lists.wald.intevation.org/mailman/listinfo/openvas-commits