Skip to content
Snippets Groups Projects
Commit 4fa2aa66 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Don't log an error if spy socket write return EPIPE (expected)

Also, resove a new gcc warning about signed/unsigned compares.
parent 3000ece5
No related branches found
No related tags found
No related merge requests found
Pipeline #5945 passed
...@@ -2574,7 +2574,7 @@ void output_thread(void* arg) ...@@ -2574,7 +2574,7 @@ void output_thread(void* arg)
/* Spy on the user locally */ /* Spy on the user locally */
if(startup->node_spybuf!=NULL if(startup->node_spybuf!=NULL
&& startup->node_spybuf[sbbs->cfg.node_num-1]!=NULL) { && startup->node_spybuf[sbbs->cfg.node_num-1]!=NULL) {
DWORD result = RingBufWrite(startup->node_spybuf[sbbs->cfg.node_num-1],buf+bufbot,i); int result = RingBufWrite(startup->node_spybuf[sbbs->cfg.node_num-1],buf+bufbot,i);
if(result != i) if(result != i)
lprintf(LOG_WARNING, "%s SHORT WRITE to spy ring buffer (%u < %u)" lprintf(LOG_WARNING, "%s SHORT WRITE to spy ring buffer (%u < %u)"
,node, result, i); ,node, result, i);
...@@ -2587,7 +2587,7 @@ void output_thread(void* arg) ...@@ -2587,7 +2587,7 @@ void output_thread(void* arg)
,node, result, errno, i, spy_topic); ,node, result, errno, i, spy_topic);
} }
if(spy_socket[sbbs->cfg.node_num-1]!=INVALID_SOCKET) if(spy_socket[sbbs->cfg.node_num-1]!=INVALID_SOCKET)
if(sendsocket(spy_socket[sbbs->cfg.node_num-1],(char*)buf+bufbot,i) != i) if(sendsocket(spy_socket[sbbs->cfg.node_num-1],(char*)buf+bufbot,i) != i && ERROR_VALUE != EPIPE)
lprintf(LOG_ERR, "%s ERROR %d writing to spy socket", node, ERROR_VALUE); lprintf(LOG_ERR, "%s ERROR %d writing to spy socket", node, ERROR_VALUE);
#ifdef __unix__ #ifdef __unix__
if(uspy_socket[sbbs->cfg.node_num-1]!=INVALID_SOCKET) if(uspy_socket[sbbs->cfg.node_num-1]!=INVALID_SOCKET)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment