diff options
Diffstat (limited to 'xrdp/xrdp_wm.c')
| -rw-r--r-- | xrdp/xrdp_wm.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c index caf55a7d..6179d2e8 100644 --- a/xrdp/xrdp_wm.c +++ b/xrdp/xrdp_wm.c @@ -236,10 +236,11 @@ xrdp_wm_load_pointer(struct xrdp_wm *self, char *file_name, char *data, init_stream(fs, 8192); fd = g_file_open(file_name); - if (fd < 1) + if (fd < 0) { log_message(LOG_LEVEL_ERROR,"xrdp_wm_load_pointer: error loading pointer from file [%s]", file_name); + xstream_free(fs); return 1; } @@ -567,7 +568,7 @@ xrdp_wm_init(struct xrdp_wm *self) g_snprintf(cfg_file, 255, "%s/xrdp.ini", XRDP_CFG_PATH); fd = g_file_open(cfg_file); /* xrdp.ini */ - if (fd > 0) + if (fd != -1) { names = list_create(); names->auto_free = 1; @@ -1744,13 +1745,13 @@ callback(long id, int msg, long param1, long param2, long param3, long param4) static int APP_CC xrdp_wm_login_mode_changed(struct xrdp_wm *self) { - g_writeln("xrdp_wm_login_mode_changed: login_mode is %d", self->login_mode); - if (self == 0) { return 0; } + g_writeln("xrdp_wm_login_mode_changed: login_mode is %d", self->login_mode); + if (self->login_mode == 0) { /* this is the inital state of the login window */ |
