This closes bug #507

If e17 is compiled with tslib but during runtime the environment variable
TSLIB_TSDEVICE is not set, ecore will accidentally use the file descriptor 0
(probably stdin) for tslib.

The problem is that _ecore_fb_ts_fd is initialized to 0, which is BAD BAD BAD
for file descriptors. It should be initialized to -1. The attached patch fixes
this. 

Thanks to John Ogness <john.ogness@linutronix.de> for bug report and fix




SVN revision: 45703
This commit is contained in:
Lars Munch 2010-01-29 11:42:26 +00:00
parent 78d08250c4
commit f71f8e0a41
1 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ struct _Ecore_Fb_Ts_Flite
};
static int _ecore_fb_ts_fd_handler(void *data, Ecore_Fd_Handler *fd_handler);
static int _ecore_fb_ts_fd = 0;
static int _ecore_fb_ts_fd = -1;
static int _ecore_fb_ts_event_byte_count = 0;
static int _ecore_fb_ts_apply_cal = 0;
static Ecore_Fb_Ts_Event _ecore_fb_ts_event;
@ -133,7 +133,7 @@ ecore_fb_ts_shutdown(void)
if (_ecore_fb_ts_fd >= 0) close(_ecore_fb_ts_fd);
if (_ecore_fb_ts_fd_handler_handle)
ecore_main_fd_handler_del(_ecore_fb_ts_fd_handler_handle);
_ecore_fb_ts_fd = 0;
_ecore_fb_ts_fd = -1;
_ecore_fb_ts_fd_handler_handle = NULL;
}