Initialize linked list for recurrent items

When switching to the generic linked list implementation for recurring
events in 9fab248 (Use generic lists for recurring apointments and
events., 2011-04-16), no initialization routine for the list of
recurring events was added. Fix this and properly initialize the list on
startup.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2014-07-16 15:52:33 +02:00
parent bd784775aa
commit f7f49da17c
4 changed files with 8 additions and 0 deletions

View File

@ -518,6 +518,7 @@ int main(int argc, char **argv)
/* Initialize non-thread-safe data structures. */ /* Initialize non-thread-safe data structures. */
event_llist_init(); event_llist_init();
recur_event_llist_init();
todo_init_list(); todo_init_list();
/* /*

View File

@ -892,6 +892,7 @@ void recur_apoint_free_bkp(void);
void recur_event_free(struct recur_event *); void recur_event_free(struct recur_event *);
void recur_apoint_free(struct recur_apoint *); void recur_apoint_free(struct recur_apoint *);
void recur_apoint_llist_init(void); void recur_apoint_llist_init(void);
void recur_event_llist_init(void);
void recur_apoint_llist_free(void); void recur_apoint_llist_free(void);
void recur_event_llist_free(void); void recur_event_llist_free(void);
struct recur_apoint *recur_apoint_new(char *, char *, long, long, char, struct recur_apoint *recur_apoint_new(char *, char *, long, long, char,

View File

@ -163,6 +163,7 @@ void dmon_start(int parent_exit_status)
apoint_llist_init(); apoint_llist_init();
recur_apoint_llist_init(); recur_apoint_llist_init();
event_llist_init(); event_llist_init();
recur_event_llist_init();
todo_init_list(); todo_init_list();
io_load_app(); io_load_app();
data_loaded = 1; data_loaded = 1;

View File

@ -140,6 +140,11 @@ void recur_apoint_llist_init(void)
LLIST_TS_INIT(&recur_alist_p); LLIST_TS_INIT(&recur_alist_p);
} }
void recur_event_llist_init(void)
{
LLIST_INIT(&recur_elist);
}
void recur_apoint_free(struct recur_apoint *rapt) void recur_apoint_free(struct recur_apoint *rapt)
{ {
mem_free(rapt->mesg); mem_free(rapt->mesg);