From 7cb81482262152ac5098cb413cc74c34a5abff73 Mon Sep 17 00:00:00 2001 From: rgrr Date: Wed, 13 Feb 2013 09:15:11 +0100 Subject: [PATCH] add_timer() does not set owning process --- core/sys/etimer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/sys/etimer.c b/core/sys/etimer.c index 0f8fba4b3..60e673544 100644 --- a/core/sys/etimer.c +++ b/core/sys/etimer.c @@ -155,17 +155,17 @@ add_timer(struct etimer *timer) etimer_request_poll(); if(timer->p != PROCESS_NONE) { - /* Timer not on list. */ - for(t = timerlist; t != NULL; t = t->next) { if(t == timer) { /* Timer already on list, bail out. */ + timer->p = PROCESS_CURRENT(); update_time(); return; } } } + /* Timer not on list. */ timer->p = PROCESS_CURRENT(); timer->next = timerlist; timerlist = timer;