diff options
author | jsorg71 <jay.sorg@gmail.com> | 2013-01-17 12:30:17 -0800 |
---|---|---|
committer | jsorg71 <jay.sorg@gmail.com> | 2013-01-17 12:30:17 -0800 |
commit | ffc7e7ff270134c7f5c73f8f86cac81038e8fee3 (patch) | |
tree | fdb57b1ee4bf75dad7ff3fef60bca09dceafe93a /common | |
parent | e632bc794bdafb8ea025396807e107a1e4b751af (diff) | |
parent | bdc678bdc3b986ea91e433d691bb7b963e0d420f (diff) | |
download | xrdp-proprietary-ffc7e7ff270134c7f5c73f8f86cac81038e8fee3.tar.gz xrdp-proprietary-ffc7e7ff270134c7f5c73f8f86cac81038e8fee3.zip |
Merge pull request #52 from Osirium/patch/text2bool
Patch/text2bool - use common function when converting string to bool
Diffstat (limited to 'common')
-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; } |