[Openvas-commits] r9490 - in trunk/openvas-cli: . omp
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Nov 22 14:40:54 CET 2010
Author: mwiegand
Date: 2010-11-22 14:40:54 +0100 (Mon, 22 Nov 2010)
New Revision: 9490
Modified:
trunk/openvas-cli/ChangeLog
trunk/openvas-cli/omp/omp.c
Log:
* omp/omp.c (main): Close the connection we have opened if the command
finished successfully.
Modified: trunk/openvas-cli/ChangeLog
===================================================================
--- trunk/openvas-cli/ChangeLog 2010-11-22 13:34:10 UTC (rev 9489)
+++ trunk/openvas-cli/ChangeLog 2010-11-22 13:40:54 UTC (rev 9490)
@@ -1,5 +1,10 @@
2010-11-22 Michael Wiegand <michael.wiegand at greenbone.net>
+ * omp/omp.c (main): Close the connection we have opened if the command
+ finished successfully.
+
+2010-11-22 Michael Wiegand <michael.wiegand at greenbone.net>
+
Added support for retrieving the OMP version of a connection endpoint
to stay compatible with both OMP 1.0 and 2.0.
Modified: trunk/openvas-cli/omp/omp.c
===================================================================
--- trunk/openvas-cli/omp/omp.c 2010-11-22 13:34:10 UTC (rev 9489)
+++ trunk/openvas-cli/omp/omp.c 2010-11-22 13:40:54 UTC (rev 9490)
@@ -1041,11 +1041,15 @@
manager_open (connection);
exit_status = manager_get_reports (connection, report_ids, format);
+ if (exit_status == 0)
+ manager_close (connection);
}
else if (cmd_get_report_formats)
{
manager_open (connection);
exit_status = manager_get_report_formats (connection);
+ if (exit_status == 0)
+ manager_close (connection);
}
else if (cmd_get_omp_version)
{
@@ -1053,7 +1057,8 @@
manager_open (connection);
exit_status = manager_get_omp_version (connection, &version);
printf ("Version: %s\n", version);
- manager_close (connection);
+ if (exit_status == 0)
+ manager_close (connection);
}
else if (cmd_modify_task)
{
More information about the Openvas-commits
mailing list