diff options
author | LawrenceK <github@lklyne.co.uk> | 2013-01-16 13:28:10 +0000 |
---|---|---|
committer | LawrenceK <github@lklyne.co.uk> | 2013-01-16 13:40:36 +0000 |
commit | 9335ba3db88d0979920371843a12f2231ec7eaaa (patch) | |
tree | 4391e14a5fa7f7ff26993f65fa196372a67eba52 | |
parent | 36cf7532fa8712bd1235d1f99a0c1331ae151c3f (diff) | |
download | xrdp-proprietary-9335ba3db88d0979920371843a12f2231ec7eaaa.tar.gz xrdp-proprietary-9335ba3db88d0979920371843a12f2231ec7eaaa.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; } |