X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2FIRCEvents.c;h=2eea34d8ecc1067bddf693e2a721b6a748abeee7;hp=83428c9b31390cbd0853feafb749298ce21d0c6e;hb=HEAD;hpb=ef9530c3f82e7c116bb141b6f710ba2d54687ec4 diff --git a/src/IRCEvents.c b/src/IRCEvents.c index 83428c9..2eea34d 100644 --- a/src/IRCEvents.c +++ b/src/IRCEvents.c @@ -21,6 +21,7 @@ #include "ChanUser.h" #include "ClientSocket.h" #include "mysqlConn.h" +#include "log.h" struct binding { void *func; @@ -105,7 +106,7 @@ int bind_##NAME(FUNCTYPE *func, int module_id) { \ if(!is_bound(TYPE, func)) { \ struct binding *cbind = malloc(sizeof(*cbind)); \ if (!cbind) { \ - perror("malloc() failed"); \ + printf_log("main", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__); \ return 0; \ } \ cbind->func = func; \ @@ -233,4 +234,4 @@ FUNC_EVENT(reload, reload_func_t, BIND_TYPE_RELOAD, (int initialization), (initi FUNC_BIND(freeclient, freeclient_func_t, BIND_TYPE_FREECLIENT) FUNC_UNBIND(freeclient, freeclient_func_t, BIND_TYPE_FREECLIENT) -FUNC_EVENT(freeclient, freeclient_func_t, BIND_TYPE_FREECLIENT, (struct ClientNode *client), (client)) +FUNC_EVENT(freeclient, freeclient_func_t, BIND_TYPE_FREECLIENT, (struct ClientSocket *client), (client))