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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Mar 17 09:47:17 CET 2009


Author: felix
Date: 2009-03-17 09:47:14 +0100 (Tue, 17 Mar 2009)
New Revision: 2814

Modified:
   trunk/openvas-client/ChangeLog
   trunk/openvas-client/nessus/comm.c
Log:
* nessus/comm.c (send_ntp_opts): Extracted from
gui_comm_send_preferences and cli_comm_send_preferences and marked as
deprecated as a comment suggests its of use to keep backward
compatibility only. Can be removed after testing.


Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog	2009-03-17 08:36:49 UTC (rev 2813)
+++ trunk/openvas-client/ChangeLog	2009-03-17 08:47:14 UTC (rev 2814)
@@ -1,5 +1,12 @@
 2009-03-17  Felix Wolfsteller <felix.wolfsteller at intevation.de>
 
+	* nessus/comm.c (send_ntp_opts): Extracted from
+	gui_comm_send_preferences and cli_comm_send_preferences and marked as
+	deprecated as a comment suggests its of use to keep backward
+	compatibility only. Can be removed after testing.
+
+2009-03-17  Felix Wolfsteller <felix.wolfsteller at intevation.de>
+
 	* nessus/comm.c: Moved forward declaration behind the defines, slight
 	modified documentation / comments.
 

Modified: trunk/openvas-client/nessus/comm.c
===================================================================
--- trunk/openvas-client/nessus/comm.c	2009-03-17 08:36:49 UTC (rev 2813)
+++ trunk/openvas-client/nessus/comm.c	2009-03-17 08:47:14 UTC (rev 2814)
@@ -712,6 +712,22 @@
 }
 
 /**
+ * @brief Workaround to use new features while keeping
+ * @brief backward compatibility.
+ * 
+ * @param socket Socket to use.
+ * @deprecated
+ */
+__attribute__ ((__deprecated__)) static void
+send_ntp_opts (int socket)
+{
+  network_printf (socket, "ntp_opt_show_end <|> yes\n");
+  network_printf (socket, "ntp_keep_communication_alive <|> yes\n");
+  network_printf (socket, "ntp_short_status <|> yes\n");
+  network_printf (socket, "ntp_client_accepts_notes <|> yes\n");
+}
+
+/**
  * @brief Sends server and plugin preferences from the cli.
  * 
  * @param context Context with plugin and server preferences hooked into.
@@ -727,14 +743,7 @@
   struct arglist *pprefs = arg_get_value(preferences, "PLUGINS_PREFS");
 
   network_printf(context->socket, "CLIENT <|> PREFERENCES <|>\n");
-  /*
-   * workaround to use new features while keeping
-   * backward compatibility
-   */
-  network_printf(context->socket, "ntp_opt_show_end <|> yes\n");
-  network_printf(context->socket, "ntp_keep_communication_alive <|> yes\n");
-  network_printf(context->socket, "ntp_short_status <|> yes\n");
-  network_printf(context->socket, "ntp_client_accepts_notes <|> yes\n");
+  send_ntp_opts (context->socket);
   if(pref)
     cli_send_prefs_arglist(context, pref, &files_to_send, 0);
   if(pprefs)
@@ -858,12 +867,7 @@
   plugins[1] = context->scanners;
 
   network_printf(context->socket, "CLIENT <|> PREFERENCES <|>\n");
-  /* Workaround to use new features while keeping
-   * backward compatibility */
-  network_printf(context->socket, "ntp_opt_show_end <|> yes\n");
-  network_printf(context->socket, "ntp_keep_communication_alive <|> yes\n");
-  network_printf(context->socket, "ntp_short_status <|> yes\n");
-  network_printf(context->socket, "ntp_client_accepts_notes <|> yes\n");
+  send_ntp_opts (context->socket);
   while(pref && pref->next)
   {
     if(pref->type == ARG_STRING)



More information about the Openvas-commits mailing list