[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 36/45: fix behaviour of GNUNET_SCHEDULER_add_selec
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 36/45: fix behaviour of GNUNET_SCHEDULER_add_select on empty fdsets |
Date: |
Sun, 31 Dec 2017 00:37:23 +0100 |
This is an automated email from the git hooks/post-receive script.
lurchi pushed a commit to branch master
in repository gnunet.
commit fe7759b2428c183fe9595640abece0937ec88bcc
Author: lurchi <address@hidden>
AuthorDate: Thu Aug 24 22:17:46 2017 +0200
fix behaviour of GNUNET_SCHEDULER_add_select on empty fdsets
if GNUNET_SCHEDULER_add_select is called with empty fdsets, the
resulting task is now added to the pending_timeout queue instead of
the pending queue. This way the driver will not know about the task.
---
src/util/scheduler.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/util/scheduler.c b/src/util/scheduler.c
index 51833a78b..cbb48c3a4 100644
--- a/src/util/scheduler.c
+++ b/src/util/scheduler.c
@@ -1717,8 +1717,7 @@ GNUNET_SCHEDULER_add_select (enum
GNUNET_SCHEDULER_Priority prio,
unsigned int read_nhandles_len, write_nhandles_len,
read_fhandles_len, write_fhandles_len;
- if ( (NULL == rs) &&
- (NULL == ws) )
+ if (((NULL == rs) && (NULL == ws)) || ((0 == rs->nsds) && (0 == ws->nsds)))
return GNUNET_SCHEDULER_add_delayed_with_priority (delay,
prio,
task,
@@ -1759,7 +1758,6 @@ GNUNET_SCHEDULER_add_select (enum
GNUNET_SCHEDULER_Priority prio,
&write_fhandles,
&write_fhandles_len);
}
- GNUNET_assert (read_nhandles_len + write_nhandles_len > 0);
init_fd_info (t,
read_nhandles,
read_nhandles_len,
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] 18/45: cosmetic fixes, (continued)
- [GNUnet-SVN] [gnunet] 18/45: cosmetic fixes, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 17/45: test_scheduler passing; new API function GNUNET_SCHEDULER_check_lifeness, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 16/45: lifeness checks; shutdown now working; checkSignal not passing yet, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 15/45: fix initFdInfo; rename to init_fd_info, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 10/45: fix segfault and pending_timeout logic, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 11/45: Smaller changes. Changed order when set_wakeup is called after some task is removed from pending_timeout, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 20/45: remove unnecessary set_wakup call, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 14/45: fix indentation; remove unneeded set_wakeup call, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 19/45: fix compilation of debug code enabled by DEBUG_FDS; fix indentation, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 25/45: fix off-by-one error that prevented reading from stdin, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 36/45: fix behaviour of GNUNET_SCHEDULER_add_select on empty fdsets,
gnunet <=
- [GNUnet-SVN] [gnunet] 39/45: Don't consider restart when the test action already finished, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 35/45: NULL-initialize array pointers, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 34/45: cleanup, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 28/45: increasing length variable is already done by GNUNET_xgrow_ (called by the GNUNET_array_append macro), gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 31/45: improve documentation about the GNUNET_array_append and GNUNET_array_grow macros, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 22/45: Revert "set fds_len in all cases; call set_wakeup only in two places", gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 33/45: GNUNET_SCHEDULER_check_lifeness not needed anymore, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 23/45: set fds_len in all cases; call set_wakeup only in two places, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 21/45: set fds_len in all cases; call set_wakeup only in two places, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 38/45: clarify documentation about adding / deleting tasks, gnunet, 2017/12/30