[Openvas-commits] r3388 - in trunk/openvas-manager: . src
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri May 15 16:57:18 CEST 2009
Author: mattm
Date: 2009-05-15 16:57:17 +0200 (Fri, 15 May 2009)
New Revision: 3388
Modified:
trunk/openvas-manager/ChangeLog
trunk/openvas-manager/src/omp.c
Log:
* src/omp.c (omp_xml_handle_end_element): Extend the ID version of OMP
STATUS to return more task information.
Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog 2009-05-15 14:22:03 UTC (rev 3387)
+++ trunk/openvas-manager/ChangeLog 2009-05-15 14:57:17 UTC (rev 3388)
@@ -1,5 +1,10 @@
2009-05-15 Matthew Mundell <mmundell at intevation.de>
+ * src/omp.c (omp_xml_handle_end_element): Extend the ID version of OMP
+ STATUS to return more task information.
+
+2009-05-15 Matthew Mundell <mmundell at intevation.de>
+
Add an intermediate "delete requested" task state, and delete the task
only after receiving the SCAN_END message from the server.
Modified: trunk/openvas-manager/src/omp.c
===================================================================
--- trunk/openvas-manager/src/omp.c 2009-05-15 14:22:03 UTC (rev 3387)
+++ trunk/openvas-manager/src/omp.c 2009-05-15 14:57:17 UTC (rev 3388)
@@ -1556,17 +1556,38 @@
"<status>407</status>");
else
{
+ int ret;
gchar* response;
+ char* name = task_name (task);
SEND_TO_CLIENT_OR_FAIL ("<status_response><status>200</status>");
- response = g_strdup_printf ("<report_count>%u</report_count>",
+ response = g_strdup_printf ("<task_id>%u</task_id>"
+ "<identifier>%s</identifier>"
+ "<status>%s</status>"
+ "<messages>"
+ "<debug>%i</debug>"
+ "<hole>%i</hole>"
+ "<info>%i</info>"
+ "<log>%i</log>"
+ "<warning>%i</warning>"
+ "</messages>"
+ "<report_count>%u</report_count>",
+ task_id (task),
+ name,
+ task_run_status_name (task),
+ task_debugs_size (task),
+ task_holes_size (task),
+ task_infos_size (task),
+ task_logs_size (task),
+ task_notes_size (task),
task_report_count (task));
- if (send_to_client (response))
+ ret = send_to_client (response);
+ g_free (response);
+ g_free (name);
+ if (ret)
{
- g_free (response);
error_send_to_client (error);
return;
}
- g_free (response);
// FIX need to handle err cases before send status
(void) send_reports (task);
}
More information about the Openvas-commits
mailing list