Skip to content
Snippets Groups Projects
Commit 6584559a authored by rswindell's avatar rswindell
Browse files

Only reports data send error if send returns < 1.

Apparently its normal on Linux for send to send short data (on non-blocking
sockets).
parent 02aa3887
No related branches found
No related tags found
No related merge requests found
...@@ -1455,7 +1455,7 @@ static void send_thread(void* arg) ...@@ -1455,7 +1455,7 @@ static void send_thread(void* arg)
#ifdef _DEBUG #ifdef _DEBUG
socket_debug[xfer.ctrl_sock]&=~SOCKET_DEBUG_SEND; socket_debug[xfer.ctrl_sock]&=~SOCKET_DEBUG_SEND;
#endif #endif
if(wr!=rd) { if(wr<1) {
if(wr==SOCKET_ERROR) { if(wr==SOCKET_ERROR) {
if(ERROR_VALUE==EWOULDBLOCK) { if(ERROR_VALUE==EWOULDBLOCK) {
/*lprintf("%04d DATA send would block, retrying",xfer.ctrl_sock);*/ /*lprintf("%04d DATA send would block, retrying",xfer.ctrl_sock);*/
...@@ -1483,13 +1483,11 @@ static void send_thread(void* arg) ...@@ -1483,13 +1483,11 @@ static void send_thread(void* arg)
error=TRUE; error=TRUE;
break; break;
} }
lprintf("%04d !DATA ERROR sent %d instead of %d on socket %d" lprintf("%04d !DATA SEND ERROR %d (%d) on socket %d"
,xfer.ctrl_sock,wr,rd,*xfer.data_sock); ,xfer.ctrl_sock, wr, ERROR_VALUE, *xfer.data_sock);
#if 0 /* Removed Mar-11-2003, this is apparently normal in Linux */ sockprintf(xfer.ctrl_sock,"451 DATA send error");
sockprintf(xfer.ctrl_sock,"451 Short DATA transfer");
error=TRUE; error=TRUE;
break; break;
#endif
} }
total+=wr; total+=wr;
*xfer.lastactive=time(NULL); *xfer.lastactive=time(NULL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment