buttplugio / buttplug

Rust Implementation of the Buttplug Sex Toy Control Protocol
https://buttplug.io
Other
882 stars 64 forks source link

Implement validity checks between user and base device configurations #627

Open qdot opened 5 months ago

qdot commented 5 months ago

With the new config system, every time a user device connects, it copies info out of the base config file to the user config and uses that definition from then on. However, if for some reason we screw up the base config, the user config will now override that info (i.e. step ranges might be wrong). We should check the validity of user configs on the finish() method of DeviceConfigManagerBuilder and make sure the loaded definitions are correct, and exclude them (and possibly fail finish()) if they aren't.

I rarely see this situation happening, but I'm pretty sure people will be mucking around with the user config file by hand even if I do build a GUI, so I'd like checks to be through.