Skip to content

Comments

Removed hosts_ordering option.#2725

Open
jhelmold wants to merge 5 commits intomainfrom
GEA-1499_Remove_hosts_ordering_from_gvmd_gvm-libs_and_gsad
Open

Removed hosts_ordering option.#2725
jhelmold wants to merge 5 commits intomainfrom
GEA-1499_Remove_hosts_ordering_from_gvmd_gvm-libs_and_gsad

Conversation

@jhelmold
Copy link
Member

What

The hosts ordering option has never been used, so it has been removed from the sources.

Why

The hosts ordering option was never used.

References

GEA-1499

Checklist

Tested manually on my local development system.

@jhelmold jhelmold marked this pull request as ready for review January 21, 2026 13:38
@jhelmold jhelmold requested review from a team as code owners January 21, 2026 13:38
Copy link
Contributor

@bjoernricks bjoernricks left a comment

Choose a reason for hiding this comment

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

Is it still possible for a GMP client to include <hosts_ordering> in the request without gvmd returning an error? otherwise we need to increase the GMP major version because it breaks our API.

@greenbonebot greenbonebot enabled auto-merge (rebase) January 30, 2026 07:36
@jhelmold jhelmold requested a review from bjoernricks January 30, 2026 07:48
Copy link
Contributor

@bjoernricks bjoernricks left a comment

Choose a reason for hiding this comment

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

Looks good to me but a gvmd dev should take another look just to be sure :-)

gvm_append_string (&modify_task_data->comment, "");
set_client_state (CLIENT_MODIFY_TASK_COMMENT);
}
/* HOSTS_ORDERING kept for reasons of compatibility */
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer if these were removed.

GMP will just "read over" any foreign elements. See the ELSE_READ_OVER that's everywhere in gmp.c, and the set_read_over at the end of gmp_xml_handle_start_element.

For example, if you run this the comments is still modified:

o m m '<modify_task task_id="8831937d-0e87-439a-807c-a9a2cf976f6a"><random_element>abc</random_element><comment>123</comment></modify_task>'

* @return 0 success, -1 error.
*/
int
migrate_266_to_267 ()
Copy link
Contributor

Choose a reason for hiding this comment

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

This number is used now.

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.

4 participants