Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 1f84ec9b authored by rswindell's avatar rswindell

Print active_clients as signed-integer.

parent 78308c6b
...@@ -2457,8 +2457,7 @@ static void ctrl_thread(void* arg) ...@@ -2457,8 +2457,7 @@ static void ctrl_thread(void* arg)
return; return;
} }
active_clients++; active_clients++, update_clients();
update_clients();
/* Initialize client display */ /* Initialize client display */
client.size=sizeof(client); client.size=sizeof(client);
...@@ -4416,12 +4415,11 @@ static void ctrl_thread(void* arg) ...@@ -4416,12 +4415,11 @@ static void ctrl_thread(void* arg)
tmp_sock=sock; tmp_sock=sock;
ftp_close_socket(&tmp_sock,__LINE__); ftp_close_socket(&tmp_sock,__LINE__);
if(active_clients>0) if(active_clients)
active_clients--; active_clients--, update_clients();
update_clients();
thread_down(); thread_down();
lprintf("%04d CTRL thread terminated (%u clients, %u threads remain, %lu served)" lprintf("%04d CTRL thread terminated (%d clients, %u threads remain, %lu served)"
,sock, active_clients, thread_count, served); ,sock, active_clients, thread_count, served);
} }
...@@ -4611,8 +4609,7 @@ void DLLCALL ftp_server(void* arg) ...@@ -4611,8 +4609,7 @@ void DLLCALL ftp_server(void* arg)
lprintf("Maximum inactivity: %d seconds",startup->max_inactivity); lprintf("Maximum inactivity: %d seconds",startup->max_inactivity);
active_clients=0; active_clients=0, update_clients();
update_clients();
strlwr(scfg.sys_id); /* Use lower-case unix-looking System ID for group name */ strlwr(scfg.sys_id); /* Use lower-case unix-looking System ID for group name */
...@@ -4768,7 +4765,7 @@ void DLLCALL ftp_server(void* arg) ...@@ -4768,7 +4765,7 @@ void DLLCALL ftp_server(void* arg)
start=time(NULL); start=time(NULL);
while(active_clients) { while(active_clients) {
if(time(NULL)-start>TIMEOUT_THREAD_WAIT) { if(time(NULL)-start>TIMEOUT_THREAD_WAIT) {
lprintf("0000 !TIMEOUT waiting for %d active clients",active_clients); lprintf("0000 !TIMEOUT waiting for %d active clients", active_clients);
break; break;
} }
mswait(100); mswait(100);
......
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