blob: e1e9f352daccc6aa81bf392e134c21ed0ec99c89 [file] [log] [blame]
Willy Tarreaub1ec8c42015-04-03 13:53:24 +02001/*
2 * Stream management functions.
3 *
4 * Copyright 2000-2012 Willy Tarreau <w@1wt.eu>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 *
11 */
12
13#include <common/config.h>
14#include <common/buffer.h>
15#include <common/debug.h>
16#include <common/memory.h>
17
18#include <types/global.h>
19#include <types/session.h>
20
21struct pool_head *pool2_session;
22
Willy Tarreau11c36242015-04-04 15:54:03 +020023void session_free(struct session *sess)
24{
25 pool_free2(pool2_session, sess);
26}
27
Willy Tarreaub1ec8c42015-04-03 13:53:24 +020028/* perform minimal intializations, report 0 in case of error, 1 if OK. */
29int init_session()
30{
31 pool2_session = create_pool("session", sizeof(struct session), MEM_F_SHARED);
32 return pool2_session != NULL;
33}
34
35/*
36 * Local variables:
37 * c-indent-level: 8
38 * c-basic-offset: 8
39 * End:
40 */