summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlisses Furquim <ulisses@profusion.mobi>2013-01-14 20:02:31 +0000
committerUlisses Furquim <ulisses@profusion.mobi>2013-01-14 20:02:31 +0000
commit90bba3a87e19261ac85be736f84fe29ebf962efc (patch)
tree19f47543eb607978cca82c51a273d0e280d26373
parent3701b41ac9486b6a56d9b5416966dc91918c6fbd (diff)
evas/async_events: fix async events counting
Before we returned the number of async events handled. Even if nobody uses that let's fix it. SVN revision: 82775
-rw-r--r--src/lib/evas/canvas/evas_async_events.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/src/lib/evas/canvas/evas_async_events.c b/src/lib/evas/canvas/evas_async_events.c
index f42478702b..3b4e18abf9 100644
--- a/src/lib/evas/canvas/evas_async_events.c
+++ b/src/lib/evas/canvas/evas_async_events.c
@@ -123,10 +123,25 @@ _evas_async_events_process_single(void)
123 int ret, wakeup; 123 int ret, wakeup;
124 124
125 ret = read(_fd_read, &wakeup, sizeof(int)); 125 ret = read(_fd_read, &wakeup, sizeof(int));
126 if (ret < 0)
127 {
128 switch (errno)
129 {
130 case EBADF:
131 case EINVAL:
132 case EIO:
133 case EISDIR:
134 _fd_read = -1;
135 }
136
137 return ret;
138 }
139
126 if (ret == sizeof(int)) 140 if (ret == sizeof(int))
127 { 141 {
128 Evas_Event_Async *ev; 142 Evas_Event_Async *ev;
129 unsigned int len, max; 143 unsigned int len, max;
144 int nr;
130 145
131 eina_lock_take(&async_lock); 146 eina_lock_take(&async_lock);
132 147
@@ -144,6 +159,7 @@ _evas_async_events_process_single(void)
144 eina_lock_release(&async_lock); 159 eina_lock_release(&async_lock);
145 160
146 DBG("Evas async events queue length: %u", len); 161 DBG("Evas async events queue length: %u", len);
162 nr = len;
147 163
148 while (len > 0) 164 while (len > 0)
149 { 165 {
@@ -152,22 +168,10 @@ _evas_async_events_process_single(void)
152 len--; 168 len--;
153 } 169 }
154 170
155 return 1; 171 return nr;
156 } 172 }
157 173
158 if (ret < 0) 174 return 0;
159 {
160 switch (errno)
161 {
162 case EBADF:
163 case EINVAL:
164 case EIO:
165 case EISDIR:
166 _fd_read = -1;
167 }
168 }
169
170 return ret;
171} 175}
172 176
173EAPI int 177EAPI int