From 787f7409368cab4ab685e20e7c0b6239b9b99a75 Mon Sep 17 00:00:00 2001 From: ArnoStiefvater Date: Wed, 14 Jul 2021 07:08:26 +0200 Subject: [PATCH 1/2] Do not send unnecessary message Fix info msg when 0 alive hosts are left to scan and max_scan_hosts limit is reached. No message will be generated for that case anymore. (cherry picked from commit ef2d453b2f85a7a136340addf90fe8c73f3adfbe) --- boreas/boreas_io.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/boreas/boreas_io.c b/boreas/boreas_io.c index b3777e7e1..c7f88de52 100644 --- a/boreas/boreas_io.c +++ b/boreas/boreas_io.c @@ -185,7 +185,10 @@ get_host_from_queue (kb_t alive_hosts_kb, gboolean *alive_deteciton_finished) num_not_scanned_hosts = get_alive_hosts_count () - get_max_scan_hosts (); - send_limit_msg (num_not_scanned_hosts); + if (0 != num_not_scanned_hosts) + { + send_limit_msg (num_not_scanned_hosts); + } } g_debug ("%s: Boreas already finished scanning and we reached the " "end of the Queue of alive hosts.", From b305842af0f11d9e27ea234465eed0c5d6e869c2 Mon Sep 17 00:00:00 2001 From: ArnoStiefvater Date: Wed, 14 Jul 2021 07:12:52 +0200 Subject: [PATCH 2/2] Add changelog entry (cherry picked from commit 91356bd5758dece39f3abdf75dee0fc3dab8cc59) --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0488807e2..5533a5bee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -73,6 +73,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Deprecated ### Removed ### Fixed +- Fix info msg when 0 alive hosts are left to scan and max_scan_hosts limit is reached. No message will be generated for that case anymore. [#561](https://github.com/greenbone/gvm-libs/pull/561) [Unreleased]: https://github.com/greenbone/gvm-libs/compare/v20.8.2...gvm-libs-20.08