settings: Be more strict in converting settings to specific data types
authorMartin Willi <martin@revosec.ch>
Mon, 7 Jul 2014 13:49:04 +0000 (15:49 +0200)
committerMartin Willi <martin@revosec.ch>
Mon, 7 Jul 2014 14:57:38 +0000 (16:57 +0200)
commit0058e26cb0a0817bc84b9e40615ce14d247201e0
tree0e4a2f9162cb526200cbf3681bac9cde7e0c40d9
parent920d466f0559e7284884bcdbe605aad8b3665c17
settings: Be more strict in converting settings to specific data types

As the behavior was inconsistent for empty strings or strings with characters
appended to a number, testing the code failed on some platforms. The new rules
are more strict, returning the default if additional characters or an empty
string was found for a setting.
src/libstrongswan/settings/settings.c
src/libstrongswan/tests/suites/test_settings.c