forked from enlightenment/efl
evas/async_events: more clear code in _async_events_put()
SVN revision: 82457
This commit is contained in:
parent
7f45507e62
commit
6e91caf73f
|
@ -216,8 +216,8 @@ EAPI Eina_Bool
|
||||||
evas_async_events_put(const void *target, Evas_Callback_Type type, void *event_info, Evas_Async_Events_Put_Cb func)
|
evas_async_events_put(const void *target, Evas_Callback_Type type, void *event_info, Evas_Async_Events_Put_Cb func)
|
||||||
{
|
{
|
||||||
Evas_Event_Async *ev;
|
Evas_Event_Async *ev;
|
||||||
ssize_t check;
|
unsigned int count;
|
||||||
int count;
|
Eina_Bool ret;
|
||||||
|
|
||||||
if (!func) return EINA_FALSE;
|
if (!func) return EINA_FALSE;
|
||||||
if (_fd_write == -1) return EINA_FALSE;
|
if (_fd_write == -1) return EINA_FALSE;
|
||||||
|
@ -244,6 +244,7 @@ evas_async_events_put(const void *target, Evas_Callback_Type type, void *event_i
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
int wakeup = 1;
|
int wakeup = 1;
|
||||||
|
ssize_t check;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -251,21 +252,25 @@ evas_async_events_put(const void *target, Evas_Callback_Type type, void *event_i
|
||||||
}
|
}
|
||||||
while ((check != sizeof (int)) &&
|
while ((check != sizeof (int)) &&
|
||||||
((errno == EINTR) || (errno == EAGAIN)));
|
((errno == EINTR) || (errno == EAGAIN)));
|
||||||
|
|
||||||
|
if (check == sizeof (int)) ret = EINA_TRUE;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ret = EINA_FALSE;
|
||||||
|
|
||||||
|
switch (errno)
|
||||||
|
{
|
||||||
|
case EBADF:
|
||||||
|
case EINVAL:
|
||||||
|
case EIO:
|
||||||
|
case EPIPE:
|
||||||
|
_fd_write = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else ret = EINA_TRUE;
|
||||||
|
|
||||||
evas_cache_image_wakeup();
|
evas_cache_image_wakeup();
|
||||||
|
|
||||||
if ((count != 0) || (check == sizeof (int)))
|
return ret;
|
||||||
return EINA_TRUE;
|
|
||||||
|
|
||||||
switch (errno)
|
|
||||||
{
|
|
||||||
case EBADF:
|
|
||||||
case EINVAL:
|
|
||||||
case EIO:
|
|
||||||
case EPIPE:
|
|
||||||
_fd_write = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue