-
Notifications
You must be signed in to change notification settings - Fork 95
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
Improve handling of http parameters and arguments for gmp #1355
Conversation
Aside from the things I've noted above I've also noticed that the "Rows Per Page" setting is now ignored. |
Yes the web server should be only a proxy between GSA and gvmd and therefore all request preparation and params should be done in the js code now. |
Abstract adding arguments into a c structure and functions.
Add gsad_gmp_arguments.c and gsad_gmp_request.c as depdendencies for gsad.
* Extract a get_entities function from get_many and handle only default arguments in get_many additionally. * Update get_tasks use get_many and get_reports_gmp to use get_entities directly. * Use gmp_arguments_t to avoid char hacking for filters * Drop extra get_reports function * Drop special handlings from get_many
* Update get_assets to use gmp_arguments * Require asset_type param
Don't request tasks and filters in get_alerts.
Don't remove filter params before its values are copied. The char data is feed when params_remove is called. Therefore the freed memory has been accessed here.
Don't add the special handling of the plural type to get_many. Instead pass the correct command types to the function.
This function isn't used in GSA.
By removing the support for the extra_xml param at get_many and get_entities the extra functions for each get commands have become obsolete too.
Don't request report formats, tasks and filters in get_alert. This has to be and is done in GSA directly
} | ||
|
||
void | ||
gmp_arguments_free (gmp_arguments_t *arguments) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The _free
in the function name makes it sound like it will immediately free the memory of the data structure, so maybe _unref
would be better.
I don't want to hold this back any longer, so I'd be fine if you changed this in another PR or we discussed this later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I thinks this is a leftover. I couldn't agree on using referencing or freeing with myself ;-) I'll change it in a future PR. Thanks a lot!
Checklist: