Commit 50804487 authored by Matteo Quintiliani's avatar Matteo Quintiliani

Fixed bug receiving zero byte from recv() 'TCP FIN or EOF received'


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@625 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent 41b46af4
......@@ -7,7 +7,7 @@
* Istituto Nazionale di Geofisica e Vulcanologia - Italy
* quintiliani@ingv.it
*
* $Id: nmxp_base.c,v 1.48 2007-12-16 21:08:32 mtheo Exp $
* $Id: nmxp_base.c,v 1.49 2008-01-10 10:06:01 mtheo Exp $
*
*/
......@@ -237,9 +237,9 @@ int nmxp_recv_ctrl(int isock, void *buffer, int length, int timeoutsec, int *rec
nmxp_log(NMXP_LOG_ERR, NMXP_LOG_D_CONNFLOW, "nmxp_recv_ctrl(): recvCount=%d length=%d (cc=%d) errno=%d (%s)\n", recvCount, length, cc, *recv_errno, recv_errno_str);
#ifdef HAVE_WINDOWS_H
if(recvCount != length || *recv_errno != WSAEWOULDBLOCK) {
if(recvCount != length || *recv_errno != WSAEWOULDBLOCK || cc == 0) {
#else
if(recvCount != length || *recv_errno != EWOULDBLOCK) {
if(recvCount != length || *recv_errno != EWOULDBLOCK || cc == 0) {
#endif
return NMXP_SOCKET_ERROR;
}
......
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