From 5f7d17f8c7bcf0193fab22ebe8aefd7f38f66191 Mon Sep 17 00:00:00 2001 From: Juan Jose Nicola Date: Fri, 18 Feb 2022 01:09:27 -0600 Subject: [PATCH] Change return code from -2 to -4 for scans already stopped. This is because the scan is in the right status. This will avoid to rewrite in the status for this report/task in the db. --- src/manage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/manage.c b/src/manage.c index 51117db1b..75a622a7a 100644 --- a/src/manage.c +++ b/src/manage.c @@ -1703,7 +1703,7 @@ get_osp_scan_status (const char *scan_id, const char *host, int port, * @param[in] scan_id The UUID of the scan on the scanner. * * @return 0 if success, -1 if error, -2 if scan was stopped, - * -3 if the scan was interrupted. + * -3 if the scan was interrupted, -4 already stopped. */ static int handle_osp_scan (task_t task, report_t report, const char *scan_id) @@ -1735,7 +1735,7 @@ handle_osp_scan (task_t task, report_t report, const char *scan_id) if (run_status == TASK_STATUS_STOPPED || run_status == TASK_STATUS_STOP_REQUESTED) { - rc = -2; + rc = -4; break; }