-/* timeq.c - NeonServ v5.1
- * 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
if(entry->execute <= now) {
entry->callback(entry->data);
next = entry->next;
+ if(timeq_events == entry)
+ timeq_events = next;
free(entry);
} else
break;
}
- timeq_events = entry;
}
struct timeq_entry* timeq_add(int seconds, timeq_callback_t *callback, void *data) {