Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #31241
Closed (moved) (moved)
Open
Issue created Jul 24, 2019 by Nick Mathewson@nickm🤹

Refactor config validation

Here's the signature for the callback for validating a configuration object:

typedef int (*validate_fn_t)(void*,void*,void*,int,char**);

This is not a great interface. For example, takes three copies of the configuration object. One is the object it's validating; one is the previous value of the object (to see if we're making a bad transition); and the last one is the default values for the object (to see if we have changed anything we weren't allowed to change).

We should divide this callback into separate pieces, and fix everything that users options_validate() directly to instead call a config_validate() wrapper function.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking