projects
/
NeonServV5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added NeonBackup recover command
[NeonServV5.git]
/
src
/
timeq.c
diff --git
a/src/timeq.c
b/src/timeq.c
index 0136c51a473f6b8b0bde5b9fd1026267a6a26672..ec9ea3e4017803440e5c5c63637e9b8aaa7ffbab 100644
(file)
--- a/
src/timeq.c
+++ b/
src/timeq.c
@@
-17,6
+17,8
@@
#include "timeq.h"
#include "IOHandler.h"
#include "timeq.h"
#include "IOHandler.h"
+#include "tools.h"
+#include "log.h"
static struct timeq_entry *timeq_events;
#ifdef HAVE_THREADS
static struct timeq_entry *timeq_events;
#ifdef HAVE_THREADS
@@
-28,6
+30,10
@@
static IOHANDLER_CALLBACK(timeq_callback) {
struct timeq_entry *entry = event->iofd->data;
switch(event->type) {
case IOEVENT_TIMEOUT:
struct timeq_entry *entry = event->iofd->data;
switch(event->type) {
case IOEVENT_TIMEOUT:
+ if(entry->name) {
+ free(entry->name);
+ entry->name = NULL;
+ }
entry->callback(entry->data);
entry->iofd = NULL;
timeq_del(entry);
entry->callback(entry->data);
entry->iofd = NULL;
timeq_del(entry);
@@
-46,7
+52,7
@@
struct timeq_entry* timeq_uadd(int useconds, int module_id, timeq_callback_t *ca
struct timeq_entry *entry = malloc(sizeof(*entry));
if (!entry)
{
struct timeq_entry *entry = malloc(sizeof(*entry));
if (!entry)
{
- p
error("malloc() failed"
);
+ p
rintf_log("main", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__
);
return NULL;
}
#ifdef HAVE_THREADS
return NULL;
}
#ifdef HAVE_THREADS