diff --git a/include/proto/channel.h b/include/proto/channel.h index f6b046991..79e5b784e 100644 --- a/include/proto/channel.h +++ b/include/proto/channel.h @@ -2,7 +2,7 @@ * 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 @@ -28,15 +28,12 @@ #include #include -#include #include #include #include #include -extern struct pool_head *pool2_channel; - /* perform minimal intializations, report 0 in case of error, 1 if OK. */ int init_channel(); diff --git a/include/types/channel.h b/include/types/channel.h index 7640caed3..7b4afc83c 100644 --- a/include/types/channel.h +++ b/include/types/channel.h @@ -2,7 +2,7 @@ * 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 @@ -23,7 +23,6 @@ #define _TYPES_CHANNEL_H #include -#include #include #include @@ -162,8 +161,6 @@ /* 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_* */ diff --git a/src/channel.c b/src/channel.c index 4e0a2ac6c..231d99f35 100644 --- a/src/channel.c +++ b/src/channel.c @@ -1,7 +1,7 @@ /* * Channel management functions. * - * Copyright 2000-2012 Willy Tarreau + * Copyright 2000-2014 Willy Tarreau * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -16,20 +16,10 @@ #include #include -#include #include #include -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 more bytes to be forwarded via the channel without * notifying the owner task. Any data pending in the buffer are scheduled to be diff --git a/src/haproxy.c b/src/haproxy.c index 872aab827..2a79b0f83 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -777,7 +777,6 @@ void init(int argc, char **argv) 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) @@ -1434,7 +1433,6 @@ void deinit(void) 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); diff --git a/src/hlua.c b/src/hlua.c index 0fe625a25..b188b0e81 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -1820,7 +1820,7 @@ __LJMP static int hlua_socket_new(lua_State *L) 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; } diff --git a/src/session.c b/src/session.c index 4e09c3468..2dc6765de 100644 --- a/src/session.c +++ b/src/session.c @@ -661,7 +661,6 @@ static void session_free(struct session *s) /* 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);