Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

(2.0) Do not add a host detail result with the host status. #145

Merged
merged 2 commits into from
Oct 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Use ordered dictionary to maintain the results order. [#119](https://github.com/greenbone/ospd/pull/119)
- Refactor ospd. [#120](https://github.com/greenbone/ospd/pull/120)
- Set default unix socket path to /var/run/ospd/ospd.sock and default pid file path to /var/run/ospd.pid. [#140](https://github.com/greenbone/ospd/pull/140)
- Do not add a host detail result with the host status. [#145](https://github.com/greenbone/ospd/pull/145)

### Fixed
- Fix scan progress. [#47](https://github.com/greenbone/ospd/pull/47)
Expand Down
12 changes: 3 additions & 9 deletions ospd/ospd.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,17 +776,11 @@ def parallel_scan(self, scan_id, target):
try:
ret = self.exec_scan(scan_id, target)
if ret == 0:
self.add_scan_host_detail(
scan_id, name='host_status', host=target, value='0'
)
logger.info("%s: Host scan dead.", target)
elif ret == 1:
self.add_scan_host_detail(
scan_id, name='host_status', host=target, value='1'
)
logger.info("%s: Host scan alived.", target)
elif ret == 2:
self.add_scan_host_detail(
scan_id, name='host_status', host=target, value='2'
)
logger.info("%s: Scan error or status unknown.", target)
else:
logger.debug('%s: No host status returned', target)
except Exception as e: # pylint: disable=broad-except
Expand Down