]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Use max_queue_size when initializing the queues
authorAlan T. DeKok <aland@freeradius.org>
Tue, 21 Aug 2012 13:31:09 +0000 (15:31 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 17 Sep 2012 12:01:01 +0000 (14:01 +0200)
src/main/threads.c

index 51e74fd1460b2bf69c6bbce6621e68b70b140009..20ba6b64b216dac10c0544099f4ec4c7544df0d2 100644 (file)
@@ -927,10 +927,7 @@ int thread_pool_init(CONF_SECTION *cs, int *spawn_flag)
         *      Allocate multiple fifos.
         */
        for (i = 0; i < RAD_LISTEN_MAX; i++) {
-               int num = mainconfig.max_requests;
-
-               if (!num || (num > 65536)) num = 65536;
-               thread_pool.fifo[i] = fr_fifo_create(num, NULL);
+               thread_pool.fifo[i] = fr_fifo_create(thread_pool.max_queue_size, NULL);
                if (!thread_pool.fifo[i]) {
                        radlog(L_ERR, "FATAL: Failed to set up request fifo");
                        return -1;