summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorjsorg71 <jay.sorg@gmail.com>2013-01-17 12:30:17 -0800
committerjsorg71 <jay.sorg@gmail.com>2013-01-17 12:30:17 -0800
commitffc7e7ff270134c7f5c73f8f86cac81038e8fee3 (patch)
treefdb57b1ee4bf75dad7ff3fef60bca09dceafe93a /common
parente632bc794bdafb8ea025396807e107a1e4b751af (diff)
parentbdc678bdc3b986ea91e433d691bb7b963e0d420f (diff)
downloadxrdp-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.c7
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;
}