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 /xrdp/xrdp_mm.c | |
| 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 'xrdp/xrdp_mm.c')
| -rw-r--r-- | xrdp/xrdp_mm.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c index fc00678f..52751b72 100644 --- a/xrdp/xrdp_mm.c +++ b/xrdp/xrdp_mm.c @@ -2034,15 +2034,8 @@ is_channel_enabled(char *inName, struct list *names, struct list *values) if ( index >= 0 ) { val = (char *)list_get_item(values, index); - - if ((g_strcasecmp(val, "yes") == 0) || - (g_strcasecmp(val, "on") == 0) || - (g_strcasecmp(val, "true") == 0) || - (g_atoi(val) != 0)) - { - reply = 1; - } - else + reply = text2bool(val); + if (reply == 0) { g_writeln("This channel is disabled: %s", name); } |
