forked from enlightenment/efl
Get the 'fd' from the handler First (regardless of read or write) so
that it can be used in the below event callback. Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
6583b83c73
commit
5be999e0f5
|
@ -47,14 +47,13 @@ _ecore_io_wrapper(void *data, Ecore_Fd_Handler *handler)
|
|||
pa_io_event *event = (pa_io_event *)data;
|
||||
int fd = 0;
|
||||
|
||||
fd = ecore_main_fd_handler_fd_get(handler);
|
||||
if (fd < 0) return ECORE_CALLBACK_RENEW;
|
||||
|
||||
if (ecore_main_fd_handler_active_get(handler, ECORE_FD_READ))
|
||||
{
|
||||
|
||||
flags |= PA_IO_EVENT_INPUT;
|
||||
|
||||
fd = ecore_main_fd_handler_fd_get(handler);
|
||||
if (fd < 0) return ECORE_CALLBACK_RENEW;
|
||||
|
||||
/* Check for HUP and report */
|
||||
if (recv(fd, buf, 64, MSG_PEEK))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue