[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 02/45: small fixes
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 02/45: small fixes |
Date: |
Sun, 31 Dec 2017 00:36:49 +0100 |
This is an automated email from the git hooks/post-receive script.
lurchi pushed a commit to branch master
in repository gnunet.
commit 7f843df63bd3d1a85d687f3e0de23594b43af6d3
Author: lurchi <address@hidden>
AuthorDate: Thu Jul 20 18:04:02 2017 +0200
small fixes
---
src/util/scheduler.c | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/src/util/scheduler.c b/src/util/scheduler.c
index e27eb0fe0..1275a684b 100644
--- a/src/util/scheduler.c
+++ b/src/util/scheduler.c
@@ -234,7 +234,7 @@ struct GNUNET_SCHEDULER_Task
* #GNUNET_SCHEDULER_add_select(), #add_without_sets() and
* #GNUNET_SCHEDULER_cancel().
*/
-GNUNET_SCHEDULER_Driver *scheduler_driver;
+static struct GNUNET_SCHEDULER_Driver *scheduler_driver;
/**
* Head of list of tasks waiting for an event.
@@ -1055,16 +1055,22 @@ GNUNET_SCHEDULER_get_load (enum
GNUNET_SCHEDULER_Priority p)
* @param task id of the task to cancel
* @return original closure of the task
*/
-void initFdINfo(GNUNET_SCHEDULER_FdInfo *fdi, struct GNUNET_SCHEDULER_Task
*task)
+void initFdInfo(struct GNUNET_SCHEDULER_FdInfo *fdi, struct
GNUNET_SCHEDULER_Task *task)
{
if (-1 != task->read_fd)
{
fdi->sock=task->read_fd;
- }else if (-1 != task->write_fd){
+ }
+ else if (-1 != task->write_fd)
+ {
fdi->sock=task->write_fd;
- } else if (NULL != task->read_set){
+ }
+ else if (NULL != task->read_set)
+ {
fdi->fd=task->read_set;
- }else if (NULL != task->write_set){
+ }
+ else if (NULL != task->write_set)
+ {
fdi->fd=task->write_set;
}
}
@@ -1102,7 +1108,7 @@ GNUNET_SCHEDULER_cancel (struct GNUNET_SCHEDULER_Task
*task)
pending_tail,
task);*/
fdi = GNUNET_new (struct GNUNET_SCHEDULER_FdInfo);
- initFdINfo(fdi, task);
+ initFdInfo(fdi, task);
scheduler_driver->del(scheduler_driver->cls, task, fdi);
}
}
@@ -1528,8 +1534,8 @@ add_without_sets (struct GNUNET_TIME_Relative delay,
pending_tail,
t);*/
fdi = GNUNET_new (struct GNUNET_SCHEDULER_FdInfo);
- initFdINfo(fdi, task);
- scheduler_driver->add(scheduler_driver, t , fdi);
+ initFdInfo(fdi, t);
+ scheduler_driver->add(scheduler_driver->cls, t , fdi);
max_priority_added = GNUNET_MAX (max_priority_added,
t->priority);
LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -1851,8 +1857,8 @@ GNUNET_SCHEDULER_add_select (enum
GNUNET_SCHEDULER_Priority prio,
pending_tail,
t);*/
fdi = GNUNET_new (struct GNUNET_SCHEDULER_FdInfo);
- initFdINfo(fdi, task);
- scheduler_driver->add(scheduler_driver, t , fdi);
+ initFdInfo(fdi, t);
+ scheduler_driver->add(scheduler_driver->cls, t , fdi);
max_priority_added = GNUNET_MAX (max_priority_added,
t->priority);
LOG (GNUNET_ERROR_TYPE_DEBUG,
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] branch master updated (5c8feda7f -> dca8eb9c4), gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 01/45: started further refactoring of scheduler. ATTENTION, actual Status does not compile!, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 02/45: small fixes,
gnunet <=
- [GNUnet-SVN] [gnunet] 06/45: GNUNET_SCHEDULER_run is calling GNUNET_SCHEDULER_run_with_driver with the default select polling backend., gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 03/45: adapt add_without_sets to scheduler driver API; reimplement initFdInfo, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 05/45: Call to set_wakeup added after tasks added/removed to/from pending_timeout, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 04/45: Nearly finished. Call to set_wakeup missing in case of tasks added to pending_timeout, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 08/45: fix warnings, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 09/45: add missing DLL insert, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 07/45: make input of getters const (needed for new scheduler API), gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 13/45: Merge branch 'refactoring-scheduler' of ssh://gnunet.org/gnunet, gnunet, 2017/12/30
- [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