(libT) #1338: EMSGSIZE and EPROTO not found on Windows

This commit is contained in:
Charles Kerr 2008-10-10 00:38:37 +00:00
parent 50b5be7b91
commit 964d7e193c
3 changed files with 6 additions and 3 deletions

View File

@ -57,4 +57,8 @@ typedef struct
}
tr_peer_event;
#ifdef WIN32
#define EMSGSIZE WSAEMSGSIZE
#endif
#endif

View File

@ -993,8 +993,7 @@ peerCallbackFunc( void * vpeer,
addStrike( t, peer );
peer->doPurge = 1;
}
else if( ( e->err == EPROTO )
|| ( e->err == ERANGE )
else if( ( e->err == ERANGE )
|| ( e->err == EMSGSIZE )
|| ( e->err == ENOTCONN ) )
{

View File

@ -1431,7 +1431,7 @@ readBtMessage( tr_peermsgs * msgs,
{
dbgmsg( msgs, "bad packet - BT message #%d with a length of %d",
(int)id, (int)msglen );
fireError( msgs, EPROTO );
fireError( msgs, EMSGSIZE );
return READ_ERR;
}