Commit bda628fe authored by Rob Swindell's avatar Rob Swindell

Fix new crash when recycling introduced in 0cc5b594

active_clients is destroyed in cleanup(), so it must be re-initialized inside
the server init/recycle loop.
parent fdf57f2a
Pipeline #126 passed with stage
in 10 minutes and 58 seconds
......@@ -6049,9 +6049,10 @@ void DLLCALL ftp_server(void* arg)
startup->shutdown_now=FALSE;
terminate_server=FALSE;
protected_uint32_init(&thread_count, 0);
protected_uint32_init(&active_clients, 0);
do {
protected_uint32_init(&active_clients, 0);
/* Setup intelligent defaults */
if(startup->port==0) startup->port=IPPORT_FTP;
if(startup->qwk_timeout==0) startup->qwk_timeout=FTP_DEFAULT_QWK_TIMEOUT; /* seconds */
......
......@@ -6012,9 +6012,10 @@ void DLLCALL mail_server(void* arg)
SetThreadName("sbbs/mailServer");
protected_uint32_init(&thread_count, 0);
protected_uint32_init(&active_clients, 0);
do {
protected_uint32_init(&active_clients, 0);
/* Setup intelligent defaults */
if(startup->relay_port==0) startup->relay_port=IPPORT_SMTP;
if(startup->submission_port==0) startup->submission_port=IPPORT_SUBMISSION;
......
......@@ -6954,9 +6954,10 @@ void DLLCALL web_server(void* arg)
startup->shutdown_now=FALSE;
terminate_server=FALSE;
protected_uint32_init(&thread_count, 0);
protected_uint32_init(&active_clients,0);
do {
protected_uint32_init(&active_clients,0);
/* Setup intelligent defaults */
if(startup->port==0) startup->port=IPPORT_HTTP;
if(startup->root_dir[0]==0) SAFECOPY(startup->root_dir,WEB_DEFAULT_ROOT_DIR);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment