[Openvas-commits] r6277 - in trunk/openvas-manager: . src
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Dec 29 19:00:33 CET 2009
Author: mattm
Date: 2009-12-29 19:00:32 +0100 (Tue, 29 Dec 2009)
New Revision: 6277
Modified:
trunk/openvas-manager/ChangeLog
trunk/openvas-manager/src/tasks_sql.h
Log:
* src/tasks_sql.h (init_escalator_task_iterator)
(init_target_task_iterator, init_config_task_iterator): Leave out hidden
tasks.
(init_manage): Use %u to insert task status. Correct example task config.
Init status of example report.
Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog 2009-12-29 16:42:23 UTC (rev 6276)
+++ trunk/openvas-manager/ChangeLog 2009-12-29 18:00:32 UTC (rev 6277)
@@ -1,5 +1,13 @@
2009-12-29 Matthew Mundell <matthew.mundell at intevation.de>
+ * src/tasks_sql.h (init_escalator_task_iterator)
+ (init_target_task_iterator, init_config_task_iterator): Leave out hidden
+ tasks.
+ (init_manage): Use %u to insert task status. Correct example task config.
+ Init status of example report.
+
+2009-12-29 Matthew Mundell <matthew.mundell at intevation.de>
+
* src/tasks_sql.h (make_report): Add status arg. Use as initial status
of report.
(create_report): Add status arg. Pass to make_report.
Modified: trunk/openvas-manager/src/tasks_sql.h
===================================================================
--- trunk/openvas-manager/src/tasks_sql.h 2009-12-29 16:42:23 UTC (rev 6276)
+++ trunk/openvas-manager/src/tasks_sql.h 2009-12-29 18:00:32 UTC (rev 6277)
@@ -2719,6 +2719,7 @@
" WHERE tasks.ROWID = task_escalators.task"
" AND task_escalators.escalator ="
" (SELECT ROWID FROM escalators WHERE escalators.name = '%s')"
+ " AND hidden = 0"
" ORDER BY tasks.name %s;",
quoted_name,
ascending ? "ASC" : "DESC");
@@ -3354,9 +3355,9 @@
sql ("INSERT into tasks (uuid, name, hidden, comment, owner,"
" run_status, start_time, end_time, config, target)"
" VALUES ('343435d6-91b0-11de-9478-ffd71f4c6f29', 'Example task',"
- " 1, 'This is an example task for the help pages.', NULL, %i,"
+ " 1, 'This is an example task for the help pages.', NULL, %u,"
" 'Tue Aug 25 21:48:25 2009', 'Tue Aug 25 21:52:16 2009',"
- " 'Full', 'Localhost');",
+ " 'Full and fast', 'Localhost');",
TASK_STATUS_DONE);
}
@@ -3374,11 +3375,13 @@
else
{
sql ("INSERT into reports (uuid, hidden, task, comment,"
- " start_time, end_time)"
+ " start_time, end_time, scan_run_status)"
" VALUES ('343435d6-91b0-11de-9478-ffd71f4c6f30', 1, %llu,"
" 'This is an example report for the help pages.',"
- " 'Tue Aug 25 21:48:25 2009', 'Tue Aug 25 21:52:16 2009');",
- task);
+ " 'Tue Aug 25 21:48:25 2009', 'Tue Aug 25 21:52:16 2009',"
+ " %u);",
+ task,
+ TASK_STATUS_DONE);
report = sqlite3_last_insert_rowid (task_db);
sql ("INSERT into results (task, subnet, host, port, nvt, type,"
" description)"
@@ -6012,7 +6015,8 @@
{
gchar *quoted_name = sql_quote (name);
init_iterator (iterator,
- "SELECT name, uuid FROM tasks WHERE target = '%s'"
+ "SELECT name, uuid FROM tasks"
+ " WHERE target = '%s' AND hidden = 0"
" ORDER BY name %s;",
quoted_name,
ascending ? "ASC" : "DESC");
@@ -7331,7 +7335,8 @@
{
gchar *quoted_name = sql_quote (name);
init_iterator (iterator,
- "SELECT name, uuid FROM tasks WHERE config = '%s'"
+ "SELECT name, uuid FROM tasks"
+ " WHERE config = '%s' AND hidden = 0"
" ORDER BY name %s;",
quoted_name,
ascending ? "ASC" : "DESC");
More information about the Openvas-commits
mailing list