Skip to content

Commit

Permalink
Change return code from -2 to -4 for scans already stopped.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jjnicola committed Feb 18, 2022
1 parent a39b162 commit 5f7d17f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 5f7d17f

Please sign in to comment.