Skip to content
Snippets Groups Projects
Commit 85f9cf2a authored by rswindell's avatar rswindell
Browse files

Addded recycle semaphore to startup structures for inter-process server

recycling without using semaphore files.
parent b86ea1c2
No related branches found
No related tags found
No related merge requests found
......@@ -4691,6 +4691,8 @@ void DLLCALL ftp_server(void* arg)
initialized=t;
break;
}
if(startup->recycle_sem!=NULL && sem_trywait(&startup->recycle_sem)==0)
startup->recycle_now=TRUE;
if(!active_clients && startup->recycle_now==TRUE) {
lprintf("0000 Recycle semaphore signaled");
startup->recycle_now=FALSE;
......
......@@ -3706,6 +3706,8 @@ void DLLCALL mail_server(void* arg)
initialized=t;
break;
}
if(startup->recycle_sem!=NULL && sem_trywait(&startup->recycle_sem)==0)
startup->recycle_now=TRUE;
if(!active_clients && startup->recycle_now==TRUE) {
lprintf("0000 Recycle semaphore signaled");
startup->recycle_now=FALSE;
......
......@@ -3974,6 +3974,8 @@ void DLLCALL bbs_thread(void* arg)
initialized=t;
break;
}
if(startup->recycle_sem!=NULL && sem_trywait(&startup->recycle_sem)==0)
startup->recycle_now=TRUE;
if(startup->recycle_now==TRUE) {
lprintf("0000 Recycle semaphore signaled");
startup->recycle_now=FALSE;
......
......@@ -1833,6 +1833,8 @@ void DLLCALL services_thread(void* arg)
initialized=t;
break;
}
if(startup->recycle_sem!=NULL && sem_trywait(&startup->recycle_sem)==0)
startup->recycle_now=TRUE;
if(!total_clients && startup->recycle_now==TRUE) {
lprintf("0000 Recycle semaphore signaled");
startup->recycle_now=FALSE;
......
......@@ -2609,6 +2609,8 @@ void DLLCALL web_server(void* arg)
initialized=t;
break;
}
if(startup->recycle_sem!=NULL && sem_trywait(&startup->recycle_sem)==0)
startup->recycle_now=TRUE;
if(!active_clients && startup->recycle_now==TRUE) {
lprintf("0000 Recycle semaphore signaled");
startup->recycle_now=FALSE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment