[Openvas-commits] r5461 - in trunk/openvas-client: . openvas

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Oct 9 13:17:43 CEST 2009


Author: jan
Date: 2009-10-09 13:17:42 +0200 (Fri, 09 Oct 2009)
New Revision: 5461

Modified:
   trunk/openvas-client/ChangeLog
   trunk/openvas-client/openvas/comm.c
Log:
* openvas/comm.c (omp_get_nvt_details): Removed. Functionality is
now in libopenvas_omp.
(fetch_new_plugins, client_omp_read_plugins): Adjusted call
accordingly.



Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog	2009-10-09 11:09:14 UTC (rev 5460)
+++ trunk/openvas-client/ChangeLog	2009-10-09 11:17:42 UTC (rev 5461)
@@ -1,5 +1,12 @@
 2009-10-09  Jan-Oliver Wagner <jan-oliver.wagner at greenbone.net>
 
+	* openvas/comm.c (omp_get_nvt_details): Removed. Functionality is
+	now in libopenvas_omp.
+	(fetch_new_plugins, client_omp_read_plugins): Adjusted call
+	accordingly.
+
+2009-10-09  Jan-Oliver Wagner <jan-oliver.wagner at greenbone.net>
+
 	Replaced self-made list "struct missing_plugins_list" by a GSList.
 	missing_plugin_list was actually a struct with a array inside, thats
 	why some protos change here as well.

Modified: trunk/openvas-client/openvas/comm.c
===================================================================
--- trunk/openvas-client/openvas/comm.c	2009-10-09 11:09:14 UTC (rev 5460)
+++ trunk/openvas-client/openvas/comm.c	2009-10-09 11:17:42 UTC (rev 5461)
@@ -101,43 +101,6 @@
 
 /* caller must free return */
 int
-omp_get_nvt_details (gnutls_session_t* session, entity_t* response)
-{
-  while (1)
-    {
-      const char* status;
-
-      if (openvas_server_send (session, "<get_nvt_details/>"))
-        return -1;
-
-      *response = NULL;
-      if (read_entity (session, response)) return -1;
-
-      status = entity_attribute (*response, "status");
-      if (status == NULL)
-        {
-          free_entity (*response);
-          return -1;
-        }
-      if (strlen (status) == 0)
-        {
-          free_entity (*response);
-          return -1;
-        }
-      char first = status[0];
-      if (first == '2') return 0;
-      if (strlen (status) == 3 && strcmp (status, "503") == 0)
-        {
-          sleep (1);
-          continue;
-        }
-      free_entity (*response);
-      return -1;
-    }
-}
-
-/* caller must free return */
-int
 omp_get_nvt_feed_checksum (gnutls_session_t* session, entity_t* response)
 {
   while (1)
@@ -1696,7 +1659,7 @@
 #if 0
           entity_t response;
           // FIX
-          response = omp_get_nvt_details (g_slist_nth_data(missing, i)->oid);
+          omp_get_nvt_details_503 (&context->session, g_slist_nth_data(missing, i)->oid, &response);
           // FIX get nvt from response
           plugin = parse_omp_plugin (nvt);
           if (plugin != NULL)
@@ -1891,7 +1854,7 @@
   entities_t nvts;
 
   context_reset_plugins(context);
-  if (omp_get_nvt_details (&context->session, &response))
+  if (omp_get_nvt_details_503 (&context->session, NULL, &response))
     show_error(_("Failed to get summary of OMP server NVTs"));
   else
     {



More information about the Openvas-commits mailing list