X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2FIRCQueue.c;h=a7cc1a4d00fd52521ba0cc108a3db83c9dbf0d69;hp=296850d076d102cf885bc8a338e9f7ef693882ba;hb=HEAD;hpb=88751acefe20e568fc945d7e5f5c11e0a9c7be60 diff --git a/src/IRCQueue.c b/src/IRCQueue.c index 296850d..a7cc1a4 100644 --- a/src/IRCQueue.c +++ b/src/IRCQueue.c @@ -18,6 +18,7 @@ #include "ClientSocket.h" #include "IOHandler.h" #include "tools.h" +#include "log.h" #define MAXPENALTY 8 /* 4 messages */ @@ -41,7 +42,7 @@ static IOHANDLER_CALLBACK(queue_callback); static struct BotQueue *initialize_queue(struct ClientSocket *client) { struct BotQueue *queue = malloc(sizeof(*queue)); if (!queue) { - perror("malloc() failed"); + printf_log("main", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__); return NULL; } queue->client = client; @@ -131,7 +132,7 @@ int queue_add(struct ClientSocket *client, char* msg, int len) { } else { struct QueueEntry *entry = malloc(sizeof(*entry)); if (!entry) { - perror("malloc() failed"); + printf_log("main", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__); return 0; } entry->msg = strdup(msg);