-/* timeq.c - NeonServ v5.2
- * Copyright (C) 2011 Philipp Kreil (pk910)
+/* timeq.c - NeonServ v5.3
+ * Copyright (C) 2011-2012 Philipp Kreil (pk910)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
time_t now = time(0);
for(entry = timeq_events; entry; entry = next) {
if(entry->execute <= now) {
- entry->callback(entry->data);
next = entry->next;
if(timeq_events == entry)
timeq_events = next;
+ entry->callback(entry->data);
free(entry);
} else
break;