diff options
author | Harald Welte <laforge@gnumonks.org> | 2009-01-02 23:57:22 +0000 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-01-02 23:57:22 +0000 |
commit | b8f04ea5a90ca79449e26c8c30a245f1cd34c0cf (patch) | |
tree | 17e54a27eb16b5daf1b19fd5fa98234c842953a1 /include/openbsc/timer.h | |
parent | 219518d06492d867909d91f1512f50d3235e1cc8 (diff) |
Add new management function to struct timer_list
Make sure that del_timer succeeds and removes an entry from the list. Currently
sending the LOCATION UPDATING REJECT from within the timer will not remove the
list element as ->active gets set to 0 in the timer updating before calling the
callback. Fix the segfault and allow the timer to be removed from within its
own callback.
Diffstat (limited to 'include/openbsc/timer.h')
-rw-r--r-- | include/openbsc/timer.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/openbsc/timer.h b/include/openbsc/timer.h index e8dc91a84..b3e809e79 100644 --- a/include/openbsc/timer.h +++ b/include/openbsc/timer.h @@ -1,5 +1,5 @@ /* - * (C) 2008 by Holger Hans Peter Freyther <zecke@selfish.org> + * (C) 2008, 2009 by Holger Hans Peter Freyther <zecke@selfish.org> * All Rights Reserved * * This program is free software; you can redistribute it and/or modify @@ -46,6 +46,7 @@ struct timer_list { struct timeval timeout; int active : 1; int handled : 1; + int in_list : 1; void (*cb)(void*); void *data; |