Skip to content
Merged
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
21 changes: 1 addition & 20 deletions openvasd/openvasd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1006,26 +1006,7 @@
cJSON *host = scanning->child;
while (host)
{
int finished_tests, total_tests, single_host_progress;

if (!cJSON_IsObject (host))
{
progress = 0;
goto cleanup;
}

finished_tests = get_member_value_or_fail (host, "finished_tests");
total_tests = get_member_value_or_fail (host, "total_tests");

if (total_tests <= 0 || finished_tests < 0)
{
progress = 0;
goto cleanup;
}

single_host_progress = (100 * finished_tests / total_tests);

running_hosts_progress_sum += single_host_progress;
running_hosts_progress_sum += cJSON_GetNumberValue (host);

Check warning on line 1009 in openvasd/openvasd.c

View check run for this annotation

Codecov / codecov/patch

openvasd/openvasd.c#L1009

Added line #L1009 was not covered by tests
host = host->next;
}
}
Expand Down