[Openvas-commits] r1318 - in trunk/openvas-server: . openvasd
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Sep 10 11:15:37 CEST 2008
Author: mwiegand
Date: 2008-09-10 11:15:36 +0200 (Wed, 10 Sep 2008)
New Revision: 1318
Modified:
trunk/openvas-server/ChangeLog
trunk/openvas-server/openvasd/pluginlaunch.c
trunk/openvas-server/openvasd/preferences.c
trunk/openvas-server/openvasd/preferences.h
Log:
Make the plugin timeout settings use OID instead of ID.
Modified: trunk/openvas-server/ChangeLog
===================================================================
--- trunk/openvas-server/ChangeLog 2008-09-10 09:03:02 UTC (rev 1317)
+++ trunk/openvas-server/ChangeLog 2008-09-10 09:15:36 UTC (rev 1318)
@@ -1,3 +1,15 @@
+2008-09-10 Michael Wiegand <michael.wiegand at intevation.de>
+
+ Make the plugin timeout settings use OID instead of ID.
+
+ * openvasd/preferences.c (preferences_plugin_timeout): Changed to use
+ OIDs.
+
+ * openvasd/preferences.h: Adjusted function declaration.
+
+ * openvasd/pluginlaunch.c (plugin_launch): Call
+ preferences_plugin_timeout with OID instead of ID.
+
2008-09-05 Jan-Oliver Wagner <jan-oliver.wagner at intevation.de>
Make the command PLUGIN_LIST send OIDs instead of old IDs.
Modified: trunk/openvas-server/openvasd/pluginlaunch.c
===================================================================
--- trunk/openvas-server/openvasd/pluginlaunch.c 2008-09-10 09:03:02 UTC (rev 1317)
+++ trunk/openvas-server/openvasd/pluginlaunch.c 2008-09-10 09:15:36 UTC (rev 1318)
@@ -430,7 +430,7 @@
processes[p].sched = sched;
processes[p].name = plugin->arglist->name;
processes[p].launch_status = plug_get_launch(plugin->arglist->value);
- processes[p].timeout = preferences_plugin_timeout(preferences, plug_get_id(plugin->arglist->value));
+ processes[p].timeout = preferences_plugin_timeout(preferences, plug_get_oid(plugin->arglist->value));
if( processes[p].timeout == 0)
processes[p].timeout = plugin->timeout;
Modified: trunk/openvas-server/openvasd/preferences.c
===================================================================
--- trunk/openvas-server/openvasd/preferences.c 2008-09-10 09:03:02 UTC (rev 1317)
+++ trunk/openvas-server/openvasd/preferences.c 2008-09-10 09:15:36 UTC (rev 1318)
@@ -454,14 +454,14 @@
int
-preferences_plugin_timeout(preferences, id)
+preferences_plugin_timeout(preferences, oid)
struct arglist * preferences;
- int id;
+ char * oid;
{
int ret = 0;
- char * pref_name = emalloc(strlen("timeout.") + 40);
+ char * pref_name = emalloc(strlen("timeout.") + 100);
- sprintf(pref_name, "timeout.%d", id);
+ sprintf(pref_name, "timeout.%s", oid);
if(arg_get_type(preferences, pref_name) == ARG_STRING)
{
int to = atoi(arg_get_value(preferences, pref_name));
Modified: trunk/openvas-server/openvasd/preferences.h
===================================================================
--- trunk/openvas-server/openvasd/preferences.h 2008-09-10 09:03:02 UTC (rev 1317)
+++ trunk/openvas-server/openvasd/preferences.h 2008-09-10 09:15:36 UTC (rev 1318)
@@ -43,7 +43,7 @@
int preferences_ntp_show_end(struct arglist *);
int preferences_log_plugins_at_load(struct arglist *);
int preferences_plugins_timeout(struct arglist *);
-int preferences_plugin_timeout(struct arglist *, int);
+int preferences_plugin_timeout(struct arglist *, char*);
int preferences_benice(struct arglist*);
char * preferences_get_string(struct arglist*, char*);
int preferences_autoload_dependencies(struct arglist*);
More information about the Openvas-commits
mailing list