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 4f5e17dd authored by deuce's avatar deuce

Fix the bug I meant to fix in the last commit.

unlock the input_thread_mutex before a continue.
This very well might fix spy socket hangs and irc.js hangs on Linux.
If it does, it also explains why I couldn't duplicate them on FreeBSD.
(FreeBSD would return EDEADLK, Linux would deadlock)
parent ddd74176
......@@ -1286,13 +1286,18 @@ void input_thread(void *arg)
close_socket(uspy_socket[sbbs->cfg.node_num-1]);
lprintf(LOG_NOTICE,"Closing local spy socket: %d",uspy_socket[sbbs->cfg.node_num-1]);
uspy_socket[sbbs->cfg.node_num-1]=INVALID_SOCKET;
if(pthread_mutex_unlock(&sbbs->input_thread_mutex)!=0)
sbbs->errormsg(WHERE,ERR_UNLOCK,"input_thread_mutex",0);
continue;
}
sock=uspy_socket[sbbs->cfg.node_num-1];
}
#endif
else
else {
if(pthread_mutex_unlock(&sbbs->input_thread_mutex)!=0)
sbbs->errormsg(WHERE,ERR_UNLOCK,"input_thread_mutex",0);
continue;
}
rd=RingBufFree(&sbbs->inbuf);
......
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