One commit that splits the rend_add_service() function into two functions. One actually adding the service to the global list and the second one to validate the service thus adding a new function: rend_validate_service()
We need this for prop224 code that will in two steps validate and then add the service when loading a service from configuration.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
I made two commits now, one that only creates the validate function (minimal changes to the code) and then a second commit that fixes the duplication in rend_add_service() and make the service configure process use both functions correctly.
OK this last branch made the changes slightly clearer.
Changes LGTM.
One thing I did not understand is why the validation function is not called by rend_service_check_dir_and_add(), and instead we have to call both functions in a row.
OK this last branch made the changes slightly clearer.
Changes LGTM.
One thing I did not understand is why the validation function is not called by rend_service_check_dir_and_add(), and instead we have to call both functions in a row.
This changes heavily in prop224 refactoring (#21979 (moved)) so it's not in that function... Would you prefer having it there and then modified in the refactoring?
OK this last branch made the changes slightly clearer.
Changes LGTM.
One thing I did not understand is why the validation function is not called by rend_service_check_dir_and_add(), and instead we have to call both functions in a row.
This changes heavily in prop224 refactoring (#21979 (moved)) so it's not in that function... Would you prefer having it there and then modified in the refactoring?
Nah, I think it's fine. It's just two occurrences for now.