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:
parent
36cf7532fa
commit
9335ba3db8
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user