Allow for any non 0 and the string to also be true. These are the tests used elsewhere in the xrdp code.

This commit is contained in:
LawrenceK 2013-01-16 13:28:10 +00:00
parent 36cf7532fa
commit 9335ba3db8

View File

@ -424,9 +424,10 @@ internalInitAndAllocStruct(void)
int APP_CC int APP_CC
text2bool(char *s) text2bool(char *s)
{ {
if (0 == g_strcasecmp(s, "1") || if ( (g_atoi(s) != 0) ||
0 == g_strcasecmp(s, "true") || (0 == g_strcasecmp(s, "true")) ||
0 == g_strcasecmp(s, "yes")) (0 == g_strcasecmp(s, "on")) ||
(0 == g_strcasecmp(s, "yes")))
{ {
return 1; return 1;
} }