X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2FIRCQueue.c;h=a7cc1a4d00fd52521ba0cc108a3db83c9dbf0d69;hp=673adff27b2e6884943cdd1bd2522d078aa116d8;hb=HEAD;hpb=70b7d70a96523b78cd470c6fe2ab78beb345d607 diff --git a/src/IRCQueue.c b/src/IRCQueue.c index 673adff..a7cc1a4 100644 --- a/src/IRCQueue.c +++ b/src/IRCQueue.c @@ -1,4 +1,4 @@ -/* IRCQueue.c - NeonServ v5.5 +/* IRCQueue.c - NeonServ v5.6 * Copyright (C) 2011-2012 Philipp Kreil (pk910) * * This program is free software: you can redistribute it and/or modify @@ -17,6 +17,8 @@ #include "IRCQueue.h" #include "ClientSocket.h" #include "IOHandler.h" +#include "tools.h" +#include "log.h" #define MAXPENALTY 8 /* 4 messages */ @@ -40,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; @@ -130,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);