[Openvas-commits] r9543 - in trunk/openvas-libraries: . misc

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sat Nov 27 00:48:55 CET 2010


Author: mattm
Date: 2010-11-27 00:48:53 +0100 (Sat, 27 Nov 2010)
New Revision: 9543

Modified:
   trunk/openvas-libraries/ChangeLog
   trunk/openvas-libraries/misc/openvas_server.c
Log:
	* misc/openvas_server.c (openvas_server_free): Only shut down the local
	side of the session in the gnutls_bye, and remove the interrupted
	countdown.

Modified: trunk/openvas-libraries/ChangeLog
===================================================================
--- trunk/openvas-libraries/ChangeLog	2010-11-26 23:15:37 UTC (rev 9542)
+++ trunk/openvas-libraries/ChangeLog	2010-11-26 23:48:53 UTC (rev 9543)
@@ -1,5 +1,11 @@
 2010-11-26  Matthew Mundell <matthew.mundell at greenbone.net>
 
+	* misc/openvas_server.c (openvas_server_free): Only shut down the local
+	side of the session in the gnutls_bye, and remove the interrupted
+	countdown.
+
+2010-11-26  Matthew Mundell <matthew.mundell at greenbone.net>
+
 	* misc/openvas_server.c (openvas_server_open, openvas_server_connect)
 	(openvas_server_attach, openvas_server_send, openvas_server_new)
 	(openvas_server_free): Make failure messages g_warnings, and trace

Modified: trunk/openvas-libraries/misc/openvas_server.c
===================================================================
--- trunk/openvas-libraries/misc/openvas_server.c	2010-11-26 23:15:37 UTC (rev 9542)
+++ trunk/openvas-libraries/misc/openvas_server.c	2010-11-26 23:48:53 UTC (rev 9543)
@@ -739,8 +739,6 @@
   struct sigaction new_action, original_action;
 #endif
 
-  int count;
-
 #if 0
   /* Turn on blocking. */
   // FIX get flags first
@@ -773,13 +771,11 @@
     return -1;
 #endif
 
-  count = 100;
-  while (count)
+  while (1)
     {
-      int ret = gnutls_bye (server_session, GNUTLS_SHUT_RDWR);
+      int ret = gnutls_bye (server_session, GNUTLS_SHUT_WR);
       if (ret == GNUTLS_E_AGAIN || ret == GNUTLS_E_INTERRUPTED)
         {
-          count--;
           continue;
         }
       if (ret)
@@ -792,8 +788,6 @@
         }
       break;
     }
-  if (count == 0)
-    g_warning ("   Gave up trying to gnutls_bye\n");
 
 #ifndef _WIN32
   if (sigaction (SIGPIPE, &original_action, NULL))



More information about the Openvas-commits mailing list