Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-02-11 04:38:32 +0300
committerFelix Fietkau <nbd@openwrt.org>2011-02-11 04:38:36 +0300
commit83037e345dd702f2a013322139ef0b7bab7e170f (patch)
tree87e21abb3d673ae35861d23b7affc0b14a5ef715 /uloop.c
parent7ec33884a3b852c139d0afb4d94bfff79804b115 (diff)
uloop: allow timeouts to cancel the event loop
Diffstat (limited to 'uloop.c')
-rw-r--r--uloop.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/uloop.c b/uloop.c
index 8410634..c2a7b3e 100644
--- a/uloop.c
+++ b/uloop.c
@@ -383,6 +383,8 @@ void uloop_run(void)
{
gettimeofday(&tv, NULL);
uloop_process_timeouts(&tv);
+ if (uloop_cancelled)
+ break;
uloop_run_events(uloop_get_next_timeout(&tv));
}
}