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

...
 
Commits (1)
......@@ -258,7 +258,7 @@ size_t conn_buf_wait_cond(struct conn_buffer *buf, size_t bcount, unsigned long
BOOL conn_connected(void)
{
if(conn_api.input_thread_running && conn_api.output_thread_running)
if(conn_api.input_thread_running == 1 && conn_api.output_thread_running == 1)
return(TRUE);
return(FALSE);
}
......@@ -396,7 +396,7 @@ int conn_connect(struct bbslist *bbs)
if(conn_api.connect) {
if(conn_api.connect(bbs)) {
conn_api.terminate = 1;
while(conn_api.input_thread_running || conn_api.output_thread_running)
while(conn_api.input_thread_running == 1 || conn_api.output_thread_running == 1)
SLEEP(1);
}
else {
......
......@@ -327,7 +327,7 @@ void pty_input_thread(void *args)
pthread_mutex_unlock(&(conn_inbuf.mutex));
}
}
conn_api.input_thread_running=0;
conn_api.input_thread_running=2;
}
#ifdef __BORLANDC__
......@@ -383,7 +383,7 @@ void pty_output_thread(void *args)
if(ret==-1)
break;
}
conn_api.output_thread_running=0;
conn_api.output_thread_running=2;
}
int pty_connect(struct bbslist *bbs)
......@@ -498,7 +498,7 @@ int pty_close(void)
kill(child_pid, SIGKILL);
waitpid(child_pid, &status, 0);
while(conn_api.input_thread_running || conn_api.output_thread_running) {
while(conn_api.input_thread_running == 1 || conn_api.output_thread_running == 1) {
conn_recv_upto(garbage, sizeof(garbage), 0);
SLEEP(1);
}
......
......@@ -50,7 +50,7 @@ void modem_input_thread(void *args)
}
if(args != NULL)
comLowerDTR(com);
conn_api.input_thread_running=0;
conn_api.input_thread_running=2;
}
void modem_output_thread(void *args)
......@@ -91,7 +91,7 @@ void modem_output_thread(void *args)
break;
}
}
conn_api.output_thread_running=0;
conn_api.output_thread_running=2;
}
int modem_response(char *str, size_t maxlen, int timeout)
......@@ -334,7 +334,7 @@ int serial_close(void)
{
conn_api.terminate=1;
while(conn_api.input_thread_running || conn_api.output_thread_running)
while(conn_api.input_thread_running == 1 || conn_api.output_thread_running == 1)
SLEEP(1);
comClose(com);
destroy_conn_buf(&conn_inbuf);
......@@ -368,7 +368,7 @@ int modem_close(void)
}
CLOSEIT:
while(conn_api.input_thread_running || conn_api.output_thread_running) {
while(conn_api.input_thread_running == 1 || conn_api.output_thread_running == 1) {
conn_recv_upto(garbage, sizeof(garbage), 0);
SLEEP(1);
}
......
......@@ -55,7 +55,7 @@ void rlogin_input_thread(void *args)
pthread_mutex_unlock(&(conn_inbuf.mutex));
}
}
conn_api.input_thread_running=0;
conn_api.input_thread_running=2;
}
#ifdef __BORLANDC__
......@@ -109,7 +109,7 @@ void rlogin_output_thread(void *args)
if(ret==-1)
break;
}
conn_api.output_thread_running=0;
conn_api.output_thread_running=2;
}
int rlogin_connect(struct bbslist *bbs)
......@@ -253,7 +253,7 @@ int rlogin_close(void)
conn_api.terminate=1;
closesocket(rlogin_sock);
while(conn_api.input_thread_running || conn_api.output_thread_running) {
while(conn_api.input_thread_running == 1 || conn_api.output_thread_running == 1) {
conn_recv_upto(garbage, sizeof(garbage), 0);
SLEEP(1);
}
......
......@@ -99,7 +99,7 @@ void ssh_input_thread(void *args)
}
}
}
conn_api.input_thread_running=0;
conn_api.input_thread_running=2;
}
void ssh_output_thread(void *args)
......@@ -142,7 +142,7 @@ void ssh_output_thread(void *args)
else
pthread_mutex_unlock(&(conn_outbuf.mutex));
}
conn_api.output_thread_running=0;
conn_api.output_thread_running=2;
}
int ssh_connect(struct bbslist *bbs)
......@@ -350,7 +350,7 @@ int ssh_close(void)
conn_api.terminate=1;
ssh_active=FALSE;
cl.SetAttribute(ssh_session, CRYPT_SESSINFO_ACTIVE, 0);
while(conn_api.input_thread_running || conn_api.output_thread_running) {
while(conn_api.input_thread_running == 1 || conn_api.output_thread_running == 1) {
conn_recv_upto(garbage, sizeof(garbage), 0);
SLEEP(1);
}
......