Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function to move a host to the end of the list #410

Merged
merged 2 commits into from
Oct 15, 2020

Conversation

jjnicola
Copy link
Member

@jjnicola jjnicola commented Oct 15, 2020

What:
Allows to put a host in the hosts structure at the end
of the host list without reset the iterator.

Why:
It was need to move the host to the end without resetting the iterator.

How:

Checklist:

@jjnicola
Copy link
Member Author

Pending unittest will be done in a separated PR.

@jjnicola jjnicola marked this pull request as draft October 15, 2020 09:02
Allows to put a host in the hosts structure at the end
of the host list without reset the iterator.
@jjnicola jjnicola marked this pull request as ready for review October 15, 2020 12:39
totalhosts = gvm_hosts_count (hosts);
assert_that (totalhosts, is_equal_to (14));

while (g_strcmp0 (gvm_host_value_str (host), "192.168.0.9"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor nitpick. There is a is_equal_to_string() function for easy use. But it does not really matter.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jjnicola jjnicola merged commit d50fdcb into greenbone:master Oct 15, 2020
@jjnicola jjnicola deleted the move-host branch October 15, 2020 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants