Skip to content
Snippets Groups Projects
Commit 48265e7c authored by deuce's avatar deuce
Browse files

More input_thead fix-ups. checking FD_ISSET() after a select error is

useless.
parent ea6c67e4
No related branches found
No related tags found
No related merge requests found
...@@ -1238,34 +1238,20 @@ void input_thread(void *arg) ...@@ -1238,34 +1238,20 @@ void input_thread(void *arg)
if(sbbs->client_socket==INVALID_SOCKET) if(sbbs->client_socket==INVALID_SOCKET)
break; break;
if(FD_ISSET(sbbs->client_socket,&socket_set)) { if(ERROR_VALUE == ENOTSOCK)
if(ERROR_VALUE == ENOTSOCK) lprintf(LOG_NOTICE,"Node %d socket closed by peer on input->select", sbbs->cfg.node_num);
lprintf(LOG_NOTICE,"Node %d socket closed by peer on input->select", sbbs->cfg.node_num); else if(ERROR_VALUE==ESHUTDOWN)
else if(ERROR_VALUE==ESHUTDOWN) lprintf(LOG_NOTICE,"Node %d socket shutdown on input->select", sbbs->cfg.node_num);
lprintf(LOG_NOTICE,"Node %d socket shutdown on input->select", sbbs->cfg.node_num); else if(ERROR_VALUE==EINTR)
else if(ERROR_VALUE==EINTR) lprintf(LOG_NOTICE,"Node %d input thread interrupted",sbbs->cfg.node_num);
lprintf(LOG_NOTICE,"Node %d input thread interrupted",sbbs->cfg.node_num); else if(ERROR_VALUE==ECONNRESET)
else if(ERROR_VALUE==ECONNRESET) lprintf(LOG_NOTICE,"Node %d connection reset by peer on input->select", sbbs->cfg.node_num);
lprintf(LOG_NOTICE,"Node %d connection reset by peer on input->select", sbbs->cfg.node_num); else if(ERROR_VALUE==ECONNABORTED)
else if(ERROR_VALUE==ECONNABORTED) lprintf(LOG_NOTICE,"Node %d connection aborted by peer on input->select", sbbs->cfg.node_num);
lprintf(LOG_NOTICE,"Node %d connection aborted by peer on input->select", sbbs->cfg.node_num); else
else lprintf(LOG_WARNING,"Node %d !ERROR %d input->select socket %d"
lprintf(LOG_WARNING,"Node %d !ERROR %d input->select socket %d" ,sbbs->cfg.node_num, ERROR_VALUE, sbbs->client_socket);
,sbbs->cfg.node_num, ERROR_VALUE, sbbs->client_socket); break;
break;
}
#ifdef __unix__
else if(uspy_socket[sbbs->cfg.node_num-1]!=INVALID_SOCKET &&
FD_ISSET(uspy_socket[sbbs->cfg.node_num-1],&socket_set)) {
if(ERROR_VALUE != EAGAIN) {
lprintf(LOG_ERR,"Node %d !ERROR %d on local spy socket %d input->select"
, sbbs->cfg.node_num, errno, uspy_socket[sbbs->cfg.node_num-1]);
close_socket(uspy_socket[sbbs->cfg.node_num-1]);
uspy_socket[sbbs->cfg.node_num-1]=INVALID_SOCKET;
}
continue;
}
#endif
} }
if(sbbs->client_socket==INVALID_SOCKET) { if(sbbs->client_socket==INVALID_SOCKET) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment