diff options
author | LawrenceK <github@lklyne.co.uk> | 2013-01-16 13:28:10 +0000 |
---|---|---|
committer | LawrenceK <github@lklyne.co.uk> | 2013-01-17 11:31:01 +0000 |
commit | e47a9cea97085a5b693bd2c9e6539bda38fa9927 (patch) | |
tree | a7d03728fee2d942ad2520378b0918b4afc5a40b | |
parent | e632bc794bdafb8ea025396807e107a1e4b751af (diff) | |
download | xrdp-proprietary-e47a9cea97085a5b693bd2c9e6539bda38fa9927.tar.gz xrdp-proprietary-e47a9cea97085a5b693bd2c9e6539bda38fa9927.zip |
Allow for any non 0 and the string to also be true. These are the tests used elsewhere in the xrdp code.
-rw-r--r-- | common/log.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/common/log.c b/common/log.c index 9b2e9289..e8e005f0 100644 --- a/common/log.c +++ b/common/log.c @@ -424,9 +424,10 @@ internalInitAndAllocStruct(void) int APP_CC text2bool(char *s) { - if (0 == g_strcasecmp(s, "1") || - 0 == g_strcasecmp(s, "true") || - 0 == g_strcasecmp(s, "yes")) + if ( (g_atoi(s) != 0) || + (0 == g_strcasecmp(s, "true")) || + (0 == g_strcasecmp(s, "on")) || + (0 == g_strcasecmp(s, "yes"))) { return 1; } |