diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2012-11-16 19:39:37 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2012-11-16 19:39:37 +0000 |
commit | 055fbd10787a85b4fc8db3e618a7dfc390f82c13 (patch) | |
tree | 6427913ea67031d0ca3068958160dfe496a8e244 /src/channel_mode.c | |
parent | b2a2b2dc1adca9f089c693b520978dc4dd0e70bf (diff) |
- Implemented memory pool allocator which basically is taken from Tor's
mempool allocator for Tor cells
- Fixed compile warnings in conf_class.c
- ./configure --enable-assert works again
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/trunk@1654 82007160-df01-0410-b94d-b575c5fd34c7
Diffstat (limited to 'src/channel_mode.c')
-rw-r--r-- | src/channel_mode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/channel_mode.c b/src/channel_mode.c index 808d186..de5b014 100644 --- a/src/channel_mode.c +++ b/src/channel_mode.c @@ -40,7 +40,7 @@ #include "whowas.h" #include "event.h" #include "memory.h" -#include "balloc.h" +#include "mempool.h" #include "log.h" #include "parse.h" @@ -107,7 +107,7 @@ static int channel_capabs[] = { CAP_EX, CAP_IE, CAP_TS6, CAP_HOPS }; static int channel_capabs[] = { CAP_EX, CAP_IE, CAP_TS6 }; #endif static struct ChCapCombo chcap_combos[NCHCAP_COMBOS]; -extern BlockHeap *ban_heap; +extern mp_pool_t *ban_pool; /* XXX check_string is propably not longer required in add_id and del_id */ @@ -224,8 +224,8 @@ add_id(struct Client *client_p, struct Channel *chptr, char *banid, int type) } } - ban_p = BlockHeapAlloc(ban_heap); - + ban_p = mp_pool_get(ban_pool); + memset(ban_p, 0, sizeof(*ban_p)); ban_p->name = xstrdup(name); ban_p->username = xstrdup(user); ban_p->host = xstrdup(host); |