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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Mar 2 12:58:06 CET 2009


Author: felix
Date: 2009-03-02 12:58:01 +0100 (Mon, 02 Mar 2009)
New Revision: 2632

Removed:
   trunk/openvas-client/nessus/families.c
   trunk/openvas-client/nessus/families.h
Modified:
   trunk/openvas-client/ChangeLog
   trunk/openvas-client/MANIFEST
   trunk/openvas-client/nessus/Makefile
   trunk/openvas-client/nessus/prefs_dialog/prefs_plugins.c
   trunk/openvas-client/nessus/prefs_dialog/prefs_plugins_tree.c
Log:
Removed obsolete module families, pointed to by cppcheck.

* nessus/families.h, nessus/families.c: Removed. Not used, a tree-based
approach is used instead.

* nessus/prefs_dialog/prefs_plugins_tree.c,
nessus/prefs_dialog/prefs_plugins.c: Removed families.h include.

* nessus/Makefile: Removed target and include of families.h .

* MANIFEST: Removed families- entries.


Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog	2009-03-02 11:02:12 UTC (rev 2631)
+++ trunk/openvas-client/ChangeLog	2009-03-02 11:58:01 UTC (rev 2632)
@@ -1,11 +1,25 @@
 2009-03-02  Felix Wolfsteller <felix.wolfsteller at intevation.de>
 
-	Use GTK Spin-Buttons instead of pure text fields for preferences
+	Removed obsolete module families, pointed to by cppcheck.
+
+	* nessus/families.h, nessus/families.c: Removed. Not used, a tree-based
+	approach is used instead.
+	
+	* nessus/prefs_dialog/prefs_plugins_tree.c,
+	nessus/prefs_dialog/prefs_plugins.c: Removed families.h include.
+	
+	* nessus/Makefile: Removed target and include of families.h .
+	
+	* MANIFEST: Removed families- entries.
+
+2009-03-02  Felix Wolfsteller <felix.wolfsteller at intevation.de>
+
+	Use GTK Spin-Buttons instead of plain text fields for preferences
 	~"max hosts to check concurrently" and ~"max checks concurrently", to
 	allow a minimum of input sanitizing (expecting integers here).
 
-	* nessus/prefs_dialog/prefs_dialog.c (prefs_dialog_set_defaults): Set values
-	to spinbuttons as float.
+	* nessus/prefs_dialog/prefs_dialog.c (prefs_dialog_set_defaults): Set
+	values to spinbuttons as float (atof), not as string.
 	
 	* nessus/prefs_dialog/prefs_dialog_scan_opt.c (prefs_dialog_scan_opt):
 	Initialize GtkSpinButtons rather than plain text fields for preferences

Modified: trunk/openvas-client/MANIFEST
===================================================================
--- trunk/openvas-client/MANIFEST	2009-03-02 11:02:12 UTC (rev 2631)
+++ trunk/openvas-client/MANIFEST	2009-03-02 11:58:01 UTC (rev 2632)
@@ -56,8 +56,6 @@
 nessus/COPYING.OpenSSL
 nessus/data_mining.c
 nessus/data_mining.h
-nessus/families.c
-nessus/families.h
 nessus/filter.c
 nessus/filter.h
 nessus/globals.h

Modified: trunk/openvas-client/nessus/Makefile
===================================================================
--- trunk/openvas-client/nessus/Makefile	2009-03-02 11:02:12 UTC (rev 2631)
+++ trunk/openvas-client/nessus/Makefile	2009-03-02 11:58:01 UTC (rev 2632)
@@ -29,7 +29,6 @@
        plugin_cache.o \
        context.o \
        preferences.o \
-       families.o \
        attack.o \
        report.o \
        report_save.o \
@@ -144,7 +143,7 @@
 prefs_plugins_tree.o : cflags prefs_dialog/prefs_plugins_tree.c \
 	prefs_dialog/prefs_plugins_tree.h filter.h \
 	../src/gui/error_dlg.h prefs_dialog/prefs_help.h globals.h \
-	plugin_infos.h families.h xpm/warning_small.xpm
+	plugin_infos.h xpm/warning_small.xpm
 	$(CC) $(CFLAGS) $(NESSUS_INCLUDE) -c prefs_dialog/prefs_plugins_tree.c 
 
 openvas_certificates.o : cflags ../src/openvas-lib/openvas_certificates.c \
@@ -215,9 +214,6 @@
 		  prefs_dialog/readonly.h
 	$(CC) $(CFLAGS) $(NESSUS_INCLUDE) -c prefs_dialog/readonly.c
 
-families.o : cflags families.c families.h globals.h
-	$(CC) $(CFLAGS) $(NESSUS_INCLUDE) -c families.c 
-
 plugin_infos.o : cflags plugin_infos.c plugin_infos.h globals.h context.h
 	$(CC) $(CFLAGS) $(NESSUS_INCLUDE) -c plugin_infos.c 
 

Deleted: trunk/openvas-client/nessus/families.c
===================================================================
--- trunk/openvas-client/nessus/families.c	2009-03-02 11:02:12 UTC (rev 2631)
+++ trunk/openvas-client/nessus/families.c	2009-03-02 11:58:01 UTC (rev 2632)
@@ -1,156 +0,0 @@
-/* Nessus
- * Copyright (C) 1998 - 2001 Renaud Deraison
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2,
- * as published by the Free Software Foundation
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * In addition, as a special exception, Renaud Deraison
- * gives permission to link the code of this program with any
- * version of the OpenSSL library which is distributed under a
- * license identical to that listed in the included COPYING.OpenSSL
- * file, and distribute linked combinations including the two.
- * You must obey the GNU General Public License in all respects
- * for all of the code used other than OpenSSL.  If you modify
- * this file, you may extend this exception to your version of the
- * file, but you are not obligated to do so.  If you do not wish to
- * do so, delete this exception statement from your version.
- */
- 
-#include <includes.h>
-#ifdef USE_GTK
-#include <gtk/gtk.h>
-#endif
-
-#include "nessus_plugin.h"
-#include "families.h"
-#include "filter.h"
-#include "globals.h"
-
-/*
- * family_init
- * 
- * initializes a set of plugin families
- */
-struct plugin_families * 
-family_init()
-{
-  struct plugin_families * ret;
-  
-  ret = emalloc(sizeof(struct plugin_families));
-  return(ret);
-}
-
-/*
- * family_add
- *
- * add a family in the family list, after having
- * checked whether the family was not already present in
- * the list
- */
-void 
-family_add(families,pluginfos)
-     struct plugin_families * families;
-     struct nessus_plugin * pluginfos;
- 
-{
-  char * name = pluginfos->family;
-  struct plugin_families * l = families;
-  int flag = 0;
-  if(!name)return;
-  if(l)
-   while(l->next && !flag)
-    {
-      if(l->name)flag = !strcmp(l->name, name);
-      l->enabled = 1;
-      l = l->next;
-    }
-  if(!flag)
-    {
-      l->next = emalloc(sizeof(struct plugin_families));
-      l->name = emalloc(strlen(name)+1);
-      strncpy(l->name, name, strlen(name));
-    }
-}
-
-/*
- * family_enable
- */
-void 
-family_enable(family, plugins, enable)
-     char * family;
-     struct nessus_plugin * plugins;
-     int enable;
-{
-  
-  while(plugins != NULL )
-    {
-      char * pname = plugins->family;
-      if( strcmp(pname, family) == 0 )
-      	{ 
-	  switch(enable)
-	  {
-	   case DISABLE_FAMILY :
-		plugins->enabled = 0;
-		break;
-	   case ENABLE_FAMILY :
-	   	if(!filter_plugin(&Filter, plugins))
-  	  	   plugins->enabled = 1;
-		else 
-  	  	   plugins->enabled = 0;
-		break;
-	   default : /* nonsense */
-	   	break;
-	  }
-	}
-      plugins = plugins->next;
-    }
-}
-
-int
-family_enabled(family, plugins)
- char * family;
- struct nessus_plugin * plugins;
-{
- while(plugins != NULL )
-    {
-      char * pname = plugins->family;
-      
-      if(pname != NULL && strcmp(pname, family) == 0 )
-  	  if( plugins->enabled != 0 ) 
-	   return 1;
-      plugins = plugins->next;
-    }
- return 0;
-}
-
-int
-family_empty(family, plugins)
- char * family;
- struct nessus_plugin * plugins;
-{
- 
- while(plugins != NULL )
- {
-  char * pname = plugins->family;
-  if(pname != NULL && strcmp(pname, family) == 0 )
-  {
-   if(!filter_plugin(&Filter, plugins))
-   return 0;
-  }
-  plugins = plugins->next;
- }
- return 1;
-}
-
-   
-

Deleted: trunk/openvas-client/nessus/families.h
===================================================================
--- trunk/openvas-client/nessus/families.h	2009-03-02 11:02:12 UTC (rev 2631)
+++ trunk/openvas-client/nessus/families.h	2009-03-02 11:58:01 UTC (rev 2632)
@@ -1,46 +0,0 @@
-/* NessusClient -- the Nessus Client
- * Copyright (C) 1998 Renaud Deraison
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * In addition, as a special exception, Renaud Deraison
- * gives permission to link the code of this program with any
- * version of the OpenSSL library which is distributed under a
- * license identical to that listed in the included COPYING.OpenSSL
- * file, and distribute linked combinations including the two.
- * You must obey the GNU General Public License in all respects
- * for all of the code used other than OpenSSL.  If you modify
- * this file, you may extend this exception to your version of the
- * file, but you are not obligated to do so.  If you do not wish to
- * do so, delete this exception statement from your version.
- */
-
-#ifndef _NESSUSC_FAMILIES_H
-#define _NESSUSC_FAMILIES_H
-
-#define ENABLE_FAMILY 1
-#define DISABLE_FAMILY 0
-
-struct plugin_families {
-	char * name;
-	int enabled;
-	struct plugin_families * next;
-	};
-	
-struct plugin_families * family_init();
-void family_add(struct plugin_families *, struct nessus_plugin *);
-void family_enable(char *, struct nessus_plugin *, int);
-int family_enabled(char *, struct nessus_plugin *);
-int family_empty(char*, struct nessus_plugin *);
-#endif

Modified: trunk/openvas-client/nessus/prefs_dialog/prefs_plugins.c
===================================================================
--- trunk/openvas-client/nessus/prefs_dialog/prefs_plugins.c	2009-03-02 11:02:12 UTC (rev 2631)
+++ trunk/openvas-client/nessus/prefs_dialog/prefs_plugins.c	2009-03-02 11:58:01 UTC (rev 2632)
@@ -33,7 +33,6 @@
 
 #include "../nessus_plugin.h"
 #include "../plugin_infos.h"
-#include "../families.h"
 #include "../preferences.h"
 #include "globals.h"
 #include "error_dlg.h"

Modified: trunk/openvas-client/nessus/prefs_dialog/prefs_plugins_tree.c
===================================================================
--- trunk/openvas-client/nessus/prefs_dialog/prefs_plugins_tree.c	2009-03-02 11:02:12 UTC (rev 2631)
+++ trunk/openvas-client/nessus/prefs_dialog/prefs_plugins_tree.c	2009-03-02 11:58:01 UTC (rev 2632)
@@ -35,7 +35,6 @@
 #include <gtk/gtk.h>
 #include "../nessus_plugin.h"
 #include "../plugin_infos.h"
-#include "../families.h"
 #include "error_dlg.h"
 #include "../xpm/warning_small.xpm"
 #include "filter.h"



More information about the Openvas-commits mailing list