[Openvas-commits] r1384 - in trunk/openvas-server: . openvasd

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Sep 19 14:13:28 CEST 2008


Author: mwiegand
Date: 2008-09-19 14:13:28 +0200 (Fri, 19 Sep 2008)
New Revision: 1384

Modified:
   trunk/openvas-server/ChangeLog
   trunk/openvas-server/openvasd/comm.c
   trunk/openvas-server/openvasd/ntp_11.c
Log:
* openvasd/ntp_11.c (ntp_11_prefs, ntp_11_send_prefs_errors): Removed
support for PREFERENCES	ERROR message type as it was never properly
implemented and is now obsolete.

* openvasd/comm.c (plugin_send_infos): Tidied up plugin search code,
fixed possible bug where an plugin would have not been found if it was
the last plugin in the list.


Modified: trunk/openvas-server/ChangeLog
===================================================================
--- trunk/openvas-server/ChangeLog	2008-09-19 12:04:01 UTC (rev 1383)
+++ trunk/openvas-server/ChangeLog	2008-09-19 12:13:28 UTC (rev 1384)
@@ -1,3 +1,13 @@
+2008-09-19  Michael Wiegand <michael.wiegand at intevation.de>
+
+	* openvasd/ntp_11.c (ntp_11_prefs, ntp_11_send_prefs_errors): Removed
+	support for PREFERENCES	ERROR message type as it was never properly
+	implemented and is now obsolete.
+
+	* openvasd/comm.c (plugin_send_infos): Tidied up plugin search code,
+	fixed possible bug where an plugin would have not been found if it was
+	the last plugin in the list.
+
 2008-09-17  Michael Wiegand <michael.wiegand at intevation.de>
 
 	Changed communication protocol to use OTP exclusively now. Removed the

Modified: trunk/openvas-server/openvasd/comm.c
===================================================================
--- trunk/openvas-server/openvasd/comm.c	2008-09-19 12:04:01 UTC (rev 1383)
+++ trunk/openvas-server/openvasd/comm.c	2008-09-19 12:13:28 UTC (rev 1384)
@@ -225,21 +225,16 @@
  if(!plugins)
   return;
 
- while(plugins->next)
+ while(plugins)
  {
   struct arglist * args = plugins->value;
-  if (args && !strcmp(oid, plug_get_oid(args))) break;
-  plugins = plugins->next;
-  }
-
-  /* XXX: This code looks like it will fail for the
-   * last plugin in the list: info will no be send
-   * because next ist NULL.
-   */
-  if(plugins->next)
+  if (args && !strcmp(oid, plug_get_oid(args)))
   {
-   send_plug_info(globals, plugins);
+    send_plug_info(globals, plugins);
+    return;
   }
+  plugins = plugins->next;
+ }
 }
 
 

Modified: trunk/openvas-server/openvasd/ntp_11.c
===================================================================
--- trunk/openvas-server/openvasd/ntp_11.c	2008-09-19 12:04:01 UTC (rev 1383)
+++ trunk/openvas-server/openvasd/ntp_11.c	2008-09-19 12:13:28 UTC (rev 1384)
@@ -243,7 +243,6 @@
  char * value;
 
  problem = ntp_11_read_prefs(globals);
- if(!problem)ntp_11_send_prefs_errors(globals);
  caps = arg_get_value(globals, "ntp_caps");
  prefs = arg_get_value(globals, "preferences");
  value = arg_get_value(prefs, "ntp_escape_crlf");
@@ -342,17 +341,6 @@
  return(0);
 }
 
-
-static void ntp_11_send_prefs_errors(globals)
- struct arglist * globals;
-{
- /* not implemented yet */
- auth_printf(globals, "SERVER <|> PREFERENCES_ERRORS <|>\n");
- auth_printf(globals, "<|> SERVER\n");
-}
-
-
-
 static int 
 ntp_11_rules(globals)
  struct arglist * globals;



More information about the Openvas-commits mailing list