]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUG] variable buffer size ignored at initialization time
authorWilly Tarreau <w@1wt.eu>
Wed, 23 Sep 2009 21:37:52 +0000 (23:37 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 Sep 2009 21:50:01 +0000 (23:50 +0200)
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.

src/haproxy.c

index 237fa253b20025abbcb560e1b676d297441f1b4c..e448f4f1d2938e878dacc6dc553dd416d1de69d8 100644 (file)
@@ -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();