summaryrefslogtreecommitdiffstats
path: root/source3/lib/events.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-01-19 20:00:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:19 -0500
commite5fbc269de86cec328c2ea0e748d6bbf3a5f5133 (patch)
tree38af5030b5669ffbdf149c828fe2bac2e40f4b56 /source3/lib/events.c
parent14889901e24eec3a60d338465397306fecf0bedf (diff)
downloadsamba-e5fbc269de86cec328c2ea0e748d6bbf3a5f5133.tar.gz
samba-e5fbc269de86cec328c2ea0e748d6bbf3a5f5133.tar.xz
samba-e5fbc269de86cec328c2ea0e748d6bbf3a5f5133.zip
r20913: Fix the build.
Jeremy. (This used to be commit dce98dae2d18126d8380f92595f315b96d48a7df)
Diffstat (limited to 'source3/lib/events.c')
-rw-r--r--source3/lib/events.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/lib/events.c b/source3/lib/events.c
index ab38a85a53e..a00db77b6be 100644
--- a/source3/lib/events.c
+++ b/source3/lib/events.c
@@ -74,11 +74,12 @@ static int timed_event_destructor(struct timed_event *te)
static void add_event_by_time(struct timed_event *te)
{
+ struct event_context *ctx = te->event_ctx;
struct timed_event *last_te, *cur_te;
/* Keep the list ordered by time. We must preserve this. */
last_te = NULL;
- for (cur_te = timed_events; cur_te; cur_te = cur_te->next) {
+ for (cur_te = ctx->timed_events; cur_te; cur_te = cur_te->next) {
/* if the new event comes before the current one break */
if (!timeval_is_zero(&cur_te->when) &&
timeval_compare(&te->when, &cur_te->when) < 0) {
@@ -87,7 +88,7 @@ static void add_event_by_time(struct timed_event *te)
last_te = cur_te;
}
- DLIST_ADD_AFTER(timed_events, te, last_te);
+ DLIST_ADD_AFTER(ctx->timed_events, te, last_te);
}
/****************************************************************************
@@ -308,7 +309,7 @@ int set_event_dispatch_time(struct event_context *event_ctx,
for (te = event_ctx->timed_events; te; te = te->next) {
if (strcmp(event_name, te->event_name) == 0) {
- DLIST_REMOVE(timed_events, te);
+ DLIST_REMOVE(event_ctx->timed_events, te);
te->when = when;
add_event_by_time(te);
return 1;