--- libaitsched/src/tasks.c 2013/08/26 07:30:07 1.18.2.1 +++ libaitsched/src/tasks.c 2013/08/26 07:40:06 1.18.2.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: tasks.c,v 1.18.2.1 2013/08/26 07:30:07 misho Exp $ +* $Id: tasks.c,v 1.18.2.2 2013/08/26 07:40:06 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -158,13 +158,16 @@ _sched_rtcWrapper(sched_task_t *t) { void *ret = NULL; sched_task_func_t func; + sched_task_t *task; - if (!t || !TASK_ROOT(t)) + if (!t || !TASK_ROOT(t) || !TASK_DATA(t)) return NULL; - else - func = TASK_FUNC(t); + else { + task = (sched_task_t*) TASK_DATA(t); + func = TASK_FUNC(task); + } - ret = func(t); + ret = func(task); timer_delete((timer_t) TASK_DATLEN(t)); return ret; }