From b94e1fc01f967532f67ce3bffb13c9ecdb9106b0 Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Tue, 8 Nov 2022 16:02:47 +0100 Subject: [PATCH] Few more changes --- src/conf.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/conf.c b/src/conf.c index 392b73e..3d7a545 100644 --- a/src/conf.c +++ b/src/conf.c @@ -550,7 +550,6 @@ static int h_maxconn(int argc, unsigned char **argv){ if(!conf.maxchild) { return(1); } - conf.backlog = 1 + (conf.maxchild>>3); #ifndef _WIN32 { struct rlimit rl; @@ -568,7 +567,7 @@ static int h_maxconn(int argc, unsigned char **argv){ static int h_backlog(int argc, unsigned char **argv){ conf.backlog = atoi((char *)argv[1]); - if(!conf.backlog) { + if(conf.maxchild < 0) { return(1); } return 0; @@ -1618,10 +1617,10 @@ struct commands commandhandlers[]={ {commandhandlers+62, "noforce", h_noforce, 1, 1}, {commandhandlers+63, "parentretries", h_parentretries, 2, 2}, {commandhandlers+64, "auto", h_proxy, 1, 0}, + {commandhandlers+65, "backlog", h_backlog, 2, 2}, #ifndef NORADIUS - {commandhandlers+65, "radius", h_radius, 3, 0}, + {commandhandlers+66, "radius", h_radius, 3, 0}, #endif - {commandhandlers+66, "backlog", h_backlog, 2, 2}, {specificcommands, "", h_noop, 1, 0} }; @@ -1865,7 +1864,7 @@ void freeconf(struct extparam *confp){ *SAFAMILY(&confp->intsa) = AF_INET; *SAFAMILY(&confp->extsa) = AF_INET; confp->maxchild = 100; - confp->backlog = 13; + confp->backlog = 0; resolvfunc = NULL; numservers = 0; acl = confp->acl;