summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-07-29 19:05:18 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2011-07-29 20:38:59 +0200
commit1da88589b22ddd4b8525c09fe4519ce1067687cb (patch)
tree2b59493b0cd0b57365dcc5e47f25fb53526d2ae9 /src
parent0126cbd1b3fd1ee46ce3c6f01fef92761c2193c7 (diff)
downloadcalcurse-1da88589b22ddd4b8525c09fe4519ce1067687cb.zip
Fix recurrent appointment notification
We probably broke this in 9fab24818a119aef08b9726f6c1cd31d5434ce34. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src')
-rw-r--r--src/recur.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/recur.c b/src/recur.c
index 50e2beb..caa5ec3 100644
--- a/src/recur.c
+++ b/src/recur.c
@@ -1004,9 +1004,9 @@ recur_exc_scan (llist_t *lexc, FILE *data_file)
}
static int
-recur_apoint_starts_after (struct recur_apoint *rapt, long time)
+recur_apoint_starts_before (struct recur_apoint *rapt, long time)
{
- return (rapt->start > time);
+ return (rapt->start < time);
}
/*
@@ -1020,9 +1020,7 @@ recur_apoint_check_next (struct notify_app *app, long start, long day)
long real_recur_start_time;
LLIST_TS_LOCK (&recur_alist_p);
- i = LLIST_TS_FIND_FIRST (&recur_alist_p, start, recur_apoint_starts_after);
-
- if (i)
+ LLIST_TS_FIND_FOREACH (&recur_alist_p, app->time, recur_apoint_starts_before, i)
{
struct recur_apoint *rapt = LLIST_TS_GET_DATA (i);
@@ -1035,7 +1033,6 @@ recur_apoint_check_next (struct notify_app *app, long start, long day)
app->got_app = 1;
}
}
-
LLIST_TS_UNLOCK (&recur_alist_p);
return (app);