From b8a5f58500859a5471936a79c7db5673c4a14605 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Fri, 28 Sep 2001 15:07:11 +0000 Subject: [PATCH] Now checks return value of send(). --- src/sbbs3/mxlookup.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/sbbs3/mxlookup.c b/src/sbbs3/mxlookup.c index ef0bf2bf02..495e71d12c 100644 --- a/src/sbbs3/mxlookup.c +++ b/src/sbbs3/mxlookup.c @@ -225,7 +225,14 @@ int dns_getmx(char* name, char* mx, char* mx2 len-=sizeof(msghdr.length); } - send(sock,msg+offset,len,0); + i=send(sock,msg+offset,len,0); + if(i!=len) { + if(i==SOCKET_ERROR) + result=ERROR_VALUE; + else + result=-2; + return(result); + } tv.tv_sec=timeout; tv.tv_usec=0; -- GitLab