50 |
|
#include "s_bsd.h" |
51 |
|
#include "log.h" |
52 |
|
#include "send.h" |
53 |
< |
#include "mempool.h" |
53 |
> |
#include "memory.h" |
54 |
|
|
55 |
|
|
56 |
|
enum |
81 |
|
|
82 |
|
#define auth_sendheader(c, i) sendto_one_notice((c), &me, "%s", HeaderMessages[(i)]) |
83 |
|
|
84 |
– |
static mp_pool_t *auth_pool; |
84 |
|
static dlink_list auth_list; |
85 |
|
|
86 |
|
|
91 |
|
static struct AuthRequest * |
92 |
|
auth_make(struct Client *client) |
93 |
|
{ |
94 |
< |
struct AuthRequest *auth = mp_pool_get(auth_pool);; |
94 |
> |
struct AuthRequest *auth = xcalloc(sizeof(*auth)); |
95 |
|
|
96 |
|
client->connection->auth = auth; |
97 |
|
auth->client = client; |
115 |
|
assert(dlinkFind(&auth_list, auth)); |
116 |
|
dlinkDelete(&auth->node, &auth_list); |
117 |
|
|
118 |
< |
mp_pool_release(auth); |
118 |
> |
xfree(auth); |
119 |
|
client->connection->auth = NULL; |
120 |
|
|
121 |
|
/* |
514 |
|
|
515 |
|
assert(dlinkFind(&auth_list, auth)); |
516 |
|
dlinkDelete(&auth->node, &auth_list); |
517 |
< |
mp_pool_release(auth); |
517 |
> |
xfree(auth); |
518 |
|
} |
519 |
|
|
520 |
|
/* |
571 |
|
.when = 1 |
572 |
|
}; |
573 |
|
|
575 |
– |
auth_pool = mp_pool_new(sizeof(struct AuthRequest), MP_CHUNK_SIZE_AUTH); |
574 |
|
event_add(&timeout_auth_queries, NULL); |
575 |
|
} |