[Openvas-commits] r11992 - in trunk/openvas-manager: . src
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Nov 4 16:23:16 CET 2011
Author: mattm
Date: 2011-11-04 16:23:14 +0100 (Fri, 04 Nov 2011)
New Revision: 11992
Modified:
trunk/openvas-manager/ChangeLog
trunk/openvas-manager/src/omp.c
Log:
* src/omp.c (buffer_notes_xml, buffer_overrides_xml): Copy ctime return to
preserve it across multiple calls.
Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog 2011-11-04 11:54:42 UTC (rev 11991)
+++ trunk/openvas-manager/ChangeLog 2011-11-04 15:23:14 UTC (rev 11992)
@@ -1,3 +1,8 @@
+2011-11-04 Matthew Mundell <matthew.mundell at greenbone.net>
+
+ * src/omp.c (buffer_notes_xml, buffer_overrides_xml): Copy ctime return to
+ preserve it across multiple calls.
+
2011-11-02 Matthew Mundell <matthew.mundell at greenbone.net>
* src/manage_sql.c (cvss_threat, prognosis_where_levels): Match CVSS
Modified: trunk/openvas-manager/src/omp.c
===================================================================
--- trunk/openvas-manager/src/omp.c 2011-11-04 11:54:42 UTC (rev 11991)
+++ trunk/openvas-manager/src/omp.c 2011-11-04 15:23:14 UTC (rev 11992)
@@ -8158,6 +8158,7 @@
{
char *name_task;
time_t creation_time, mod_time;
+ gchar *creation, *mod;
int trash_task;
if (uuid_task)
@@ -8172,7 +8173,9 @@
}
creation_time = note_iterator_creation_time (notes);
+ creation = g_strdup (ctime_strip_newline (&creation_time));
mod_time = note_iterator_modification_time (notes);
+ mod = g_strdup (ctime_strip_newline (&mod_time));
buffer_xml_append_printf
(buffer,
@@ -8189,8 +8192,8 @@
note_iterator_uuid (notes),
note_iterator_nvt_oid (notes),
note_iterator_nvt_name (notes),
- ctime_strip_newline (&creation_time),
- ctime_strip_newline (&mod_time),
+ creation,
+ mod,
note_iterator_text (notes),
note_iterator_hosts (notes)
? note_iterator_hosts (notes) : "",
@@ -8205,6 +8208,8 @@
|| (note_iterator_result (notes) && (uuid_result == NULL))));
free (name_task);
+ g_free (creation);
+ g_free (mod);
if (include_result && note_iterator_result (notes))
{
@@ -8300,6 +8305,7 @@
{
char *name_task;
time_t creation_time, mod_time;
+ gchar *creation, *mod;
int trash_task;
if (uuid_task)
@@ -8314,7 +8320,9 @@
}
creation_time = override_iterator_creation_time (overrides);
+ creation = g_strdup (ctime_strip_newline (&creation_time));
mod_time = override_iterator_modification_time (overrides);
+ mod = g_strdup (ctime_strip_newline (&mod_time));
buffer_xml_append_printf
(buffer,
@@ -8332,8 +8340,8 @@
override_iterator_uuid (overrides),
override_iterator_nvt_oid (overrides),
override_iterator_nvt_name (overrides),
- ctime_strip_newline (&creation_time),
- ctime_strip_newline (&mod_time),
+ creation,
+ mod,
override_iterator_text (overrides),
override_iterator_hosts (overrides)
? override_iterator_hosts (overrides) : "",
@@ -8349,6 +8357,8 @@
|| (override_iterator_result (overrides) && (uuid_result == NULL))));
free (name_task);
+ g_free (creation);
+ g_free (mod);
if (include_result && override_iterator_result (overrides))
{
More information about the Openvas-commits
mailing list