* include/proto/channel.h
* Channel management definitions, macros and inline functions.
*
- * Copyright (C) 2000-2012 Willy Tarreau - w@1wt.eu
+ * Copyright (C) 2000-2014 Willy Tarreau - w@1wt.eu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#include <common/config.h>
#include <common/chunk.h>
-#include <common/memory.h>
#include <common/ticks.h>
#include <common/time.h>
#include <types/channel.h>
#include <types/global.h>
-extern struct pool_head *pool2_channel;
-
/* perform minimal intializations, report 0 in case of error, 1 if OK. */
int init_channel();
* include/types/channel.h
* Channel management definitions, macros and inline functions.
*
- * Copyright (C) 2000-2012 Willy Tarreau - w@1wt.eu
+ * Copyright (C) 2000-2014 Willy Tarreau - w@1wt.eu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#define _TYPES_CHANNEL_H
#include <common/config.h>
-#include <common/chunk.h>
#include <common/buffer.h>
#include <types/stream_interface.h>
/* Magic value to forward infinite size (TCP, ...), used with ->to_forward */
#define CHN_INFINITE_FORWARD MAX_RANGE(unsigned int)
-/* needed for a declaration below */
-struct session;
struct channel {
unsigned int flags; /* CF_* */
/*
* Channel management functions.
*
- * Copyright 2000-2012 Willy Tarreau <w@1wt.eu>
+ * Copyright 2000-2014 Willy Tarreau <w@1wt.eu>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
#include <string.h>
#include <common/config.h>
-#include <common/memory.h>
#include <common/buffer.h>
#include <proto/channel.h>
-struct pool_head *pool2_channel;
-
-
-/* perform minimal intializations, report 0 in case of error, 1 if OK. */
-int init_channel()
-{
- pool2_channel = create_pool("channel", sizeof(struct channel), MEM_F_SHARED);
- return pool2_channel != NULL;
-}
/* Schedule up to <bytes> more bytes to be forwarded via the channel without
* notifying the owner task. Any data pending in the buffer are scheduled to be
global_listener_queue_task->expire = TICK_ETERNITY;
/* now we know the buffer size, we can initialize the channels and buffers */
- init_channel();
init_buffer();
if (have_appsession)
pool_destroy2(pool2_session);
pool_destroy2(pool2_connection);
pool_destroy2(pool2_buffer);
- pool_destroy2(pool2_channel);
pool_destroy2(pool2_requri);
pool_destroy2(pool2_task);
pool_destroy2(pool2_capture);
memset(socket, 0, sizeof(*socket));
/* Check if the various memory pools are intialized. */
- if (!pool2_session || !pool2_channel || !pool2_buffer) {
+ if (!pool2_session || !pool2_buffer) {
hlua_pusherror(L, "socket: uninitialized pools.");
goto out_fail_conf;
}
/* We may want to free the maximum amount of pools if the proxy is stopping */
if (fe && unlikely(fe->state == PR_STSTOPPED)) {
pool_flush2(pool2_buffer);
- pool_flush2(pool2_channel);
pool_flush2(pool2_hdr_idx);
pool_flush2(pool2_requri);
pool_flush2(pool2_capture);