Fixed hktask_add not comparing task names if there was only a single task.
This commit is contained in:
@ -116,9 +116,20 @@ HKTASK *task, *ptr;
|
|||||||
ptr = ptr->next;
|
ptr = ptr->next;
|
||||||
}
|
}
|
||||||
if (ptr)
|
if (ptr)
|
||||||
|
{
|
||||||
|
if (strcmp(ptr->name, name) == 0)
|
||||||
|
{
|
||||||
|
spinlock_release(&tasklock);
|
||||||
|
free(task->name);
|
||||||
|
free(task);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
ptr->next = task;
|
ptr->next = task;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
tasks = task;
|
tasks = task;
|
||||||
|
}
|
||||||
spinlock_release(&tasklock);
|
spinlock_release(&tasklock);
|
||||||
|
|
||||||
return task->nextdue;
|
return task->nextdue;
|
||||||
|
Reference in New Issue
Block a user