summaryrefslogtreecommitdiff
path: root/legacy/ecore
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2010-12-01 03:31:55 +0000
committerCarsten Haitzler <raster@rasterman.com>2010-12-01 03:31:55 +0000
commita0f2602c291e2369d7b492d99a31a64808a17bde (patch)
tree023331dc2447cd61cfc2a4e7772c6cd4297b392c /legacy/ecore
parent1d759c88d19a182e3c28bbb65f189047fcc3f371 (diff)
compacter code.
SVN revision: 55107
Diffstat (limited to 'legacy/ecore')
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_main.c37
1 files changed, 10 insertions, 27 deletions
diff --git a/legacy/ecore/src/lib/ecore/ecore_main.c b/legacy/ecore/src/lib/ecore/ecore_main.c
index fb2cc6850a..9465dfe4f5 100644
--- a/legacy/ecore/src/lib/ecore/ecore_main.c
+++ b/legacy/ecore/src/lib/ecore/ecore_main.c
@@ -320,6 +320,7 @@ static inline int _ecore_main_fdh_poll_mark_active(void)
320 for (i = 0; i < ret; i++) 320 for (i = 0; i < ret; i++)
321 { 321 {
322 Ecore_Fd_Handler *fdh; 322 Ecore_Fd_Handler *fdh;
323 Eina_Bool pst, st;
323 324
324 fdh = ev[i].data.ptr; 325 fdh = ev[i].data.ptr;
325 if (!ECORE_MAGIC_CHECK(fdh, ECORE_MAGIC_FD_HANDLER)) 326 if (!ECORE_MAGIC_CHECK(fdh, ECORE_MAGIC_FD_HANDLER))
@@ -333,33 +334,15 @@ static inline int _ecore_main_fdh_poll_mark_active(void)
333 ERR("deleted fd in epoll"); 334 ERR("deleted fd in epoll");
334 continue; 335 continue;
335 } 336 }
336 if (ev[i].events & EPOLLIN) 337 pst = st = fdh->read_active | fdh->write_active | fdh->error_active;
337 { 338 if ((ev[i].events & EPOLLIN) && (!fdh->read_active))
338 if (!fdh->read_active) 339 st = fdh->read_active = EINA_TRUE;
339 { 340 if ((ev[i].events & EPOLLOUT) && (!fdh->write_active))
340 fdh->read_active = EINA_TRUE; 341 st = fdh->write_active = EINA_TRUE;
341 if ((!fdh->write_active) && (!fdh->error_active)) 342 if ((ev[i].events & EPOLLERR) && (!fdh->error_active))
342 fd_handlers_to_call = eina_list_append(fd_handlers_to_call, fdh); 343 st = fdh->error_active = EINA_TRUE;
343 } 344 if (pst != st)
344 } 345 fd_handlers_to_call = eina_list_append(fd_handlers_to_call, fdh);
345 if (ev[i].events & EPOLLOUT)
346 {
347 if (!fdh->write_active)
348 {
349 fdh->write_active = EINA_TRUE;
350 if ((!fdh->read_active) && (!fdh->error_active))
351 fd_handlers_to_call = eina_list_append(fd_handlers_to_call, fdh);
352 }
353 }
354 if (ev[i].events & EPOLLERR)
355 {
356 if (!fdh->error_active)
357 {
358 fdh->error_active = EINA_TRUE;
359 if ((!fdh->read_active) && (!fdh->write_active))
360 fd_handlers_to_call = eina_list_append(fd_handlers_to_call, fdh);
361 }
362 }
363 } 346 }
364 347
365 return ret; 348 return ret;