Skip to content
Snippets Groups Projects
Commit bda628fe authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

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
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #126 passed
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment