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;
|
pa_io_event *event = (pa_io_event *)data;
|
||||||
int fd = 0;
|
int fd = 0;
|
||||||
|
|
||||||
if (ecore_main_fd_handler_active_get(handler, ECORE_FD_READ))
|
|
||||||
{
|
|
||||||
|
|
||||||
flags |= PA_IO_EVENT_INPUT;
|
|
||||||
|
|
||||||
fd = ecore_main_fd_handler_fd_get(handler);
|
fd = ecore_main_fd_handler_fd_get(handler);
|
||||||
if (fd < 0) return ECORE_CALLBACK_RENEW;
|
if (fd < 0) return ECORE_CALLBACK_RENEW;
|
||||||
|
|
||||||
|
if (ecore_main_fd_handler_active_get(handler, ECORE_FD_READ))
|
||||||
|
{
|
||||||
|
flags |= PA_IO_EVENT_INPUT;
|
||||||
|
|
||||||
/* Check for HUP and report */
|
/* Check for HUP and report */
|
||||||
if (recv(fd, buf, 64, MSG_PEEK))
|
if (recv(fd, buf, 64, MSG_PEEK))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue