From 7cb81482262152ac5098cb413cc74c34a5abff73 Mon Sep 17 00:00:00 2001 From: rgrr Date: Wed, 13 Feb 2013 09:15:11 +0100 Subject: [PATCH 1/2] 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; From ae62a0d1425bb487da05b9bdfcbd85e09a248416 Mon Sep 17 00:00:00 2001 From: hardy Date: Mon, 18 Feb 2013 20:34:24 +0100 Subject: [PATCH 2/2] one blank less --- core/sys/etimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/sys/etimer.c b/core/sys/etimer.c index 60e673544..34917aa93 100644 --- a/core/sys/etimer.c +++ b/core/sys/etimer.c @@ -158,7 +158,7 @@ add_timer(struct etimer *timer) for(t = timerlist; t != NULL; t = t->next) { if(t == timer) { /* Timer already on list, bail out. */ - timer->p = PROCESS_CURRENT(); + timer->p = PROCESS_CURRENT(); update_time(); return; }