mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 23:27:04 +02:00
CLEANUP: remove now unused channel pool
The channels are now part of the struct session. Their pool is not needed anymore.
This commit is contained in:
parent
22ec1eadd0
commit
a27dc19eda
@ -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 <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();
|
||||
|
||||
|
@ -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 <common/config.h>
|
||||
#include <common/chunk.h>
|
||||
#include <common/buffer.h>
|
||||
#include <types/stream_interface.h>
|
||||
|
||||
@ -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_* */
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* 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
|
||||
@ -16,20 +16,10 @@
|
||||
#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
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user