aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlurchi <lurchi@strangeplace.net>2017-09-04 12:23:51 +0200
committerlurchi <lurchi@strangeplace.net>2017-09-04 12:23:51 +0200
commit023013b657c4f0fa60bcbbf3b795f76226a9485b (patch)
tree9f5f490911a2e553b584a296843117b9abcc6dec /src
parentb851ecf1aa048e51439e3be631cd19ca84e4dc5a (diff)
downloadgnunet-023013b657c4f0fa60bcbbf3b795f76226a9485b.tar.gz
gnunet-023013b657c4f0fa60bcbbf3b795f76226a9485b.zip
remove scheduler->internal code from driver loop
Diffstat (limited to 'src')
-rw-r--r--src/util/scheduler.c30
1 files changed, 7 insertions, 23 deletions
diff --git a/src/util/scheduler.c b/src/util/scheduler.c
index 5f627cfb5..a2eaab9aa 100644
--- a/src/util/scheduler.c
+++ b/src/util/scheduler.c
@@ -2263,31 +2263,15 @@ select_loop (void *cls,
2263#endif 2263#endif
2264#endif 2264#endif
2265#if DEBUG_FDS 2265#if DEBUG_FDS
2266 struct GNUNET_SCHEDULER_Task *t; 2266 struct Scheduled *s;
2267 // FIXME: pending_head is a scheduler-internal variable! 2267 for (s = context->scheduled_head; NULL != s; s = s->next)
2268 for (t = pending_head; NULL != t; t = t->next)
2269 { 2268 {
2270 if (-1 != t->read_fd) 2269 int flags = fcntl (s->fdi->sock, F_GETFD);
2270 if ((flags == -1) && (errno == EBADF))
2271 { 2271 {
2272 int flags = fcntl (t->read_fd, F_GETFD); 2272 LOG (GNUNET_ERROR_TYPE_ERROR,
2273 if ((flags == -1) && (errno == EBADF)) 2273 "Got invalid file descriptor %d!\n",
2274 { 2274 s->fdi->sock);
2275 LOG (GNUNET_ERROR_TYPE_ERROR,
2276 "Got invalid file descriptor %d!\n",
2277 t->read_fd);
2278 dump_backtrace (t);
2279 }
2280 }
2281 if (-1 != t->write_fd)
2282 {
2283 int flags = fcntl (t->write_fd, F_GETFD);
2284 if ((flags == -1) && (errno == EBADF))
2285 {
2286 LOG (GNUNET_ERROR_TYPE_ERROR,
2287 "Got invalid file descriptor %d!\n",
2288 t->write_fd);
2289 dump_backtrace (t);
2290 }
2291 } 2275 }
2292 } 2276 }
2293#endif 2277#endif