From: Willy Tarreau Date: Wed, 23 Sep 2009 21:37:52 +0000 (+0200) Subject: [BUG] variable buffer size ignored at initialization time X-Git-Tag: v1.4-dev3~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8280d6496127aac6da5f90866ad26af13fe89a4e;p=thirdparty%2Fhaproxy.git [BUG] variable buffer size ignored at initialization time Commit 27a674efb84bde8c045b87c9634f123e2f8925dc introduced the ability to configure buffer sizes. Unfortunately, the pool was created before the conf was read, so that is was always set to the default size. In order to fix that, we delay the call to init_buffer(), which is not a problem since nothing uses it during the initialization. --- diff --git a/src/haproxy.c b/src/haproxy.c index 237fa253b2..e448f4f1d2 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -404,7 +404,7 @@ void init(int argc, char **argv) signal_init(); init_task(); init_session(); - init_buffer(); + /* warning, we init buffers later */ init_pendconn(); init_proto_http(); @@ -556,6 +556,9 @@ void init(int argc, char **argv) exit(0); } + /* now we know the buffer size, we can initialize the buffers */ + init_buffer(); + if (have_appsession) appsession_init();