mirror of
https://github.com/transmission/transmission
synced 2025-02-26 16:02:51 +00:00
(libT) #1338: EMSGSIZE and EPROTO not found on Windows
This commit is contained in:
parent
50b5be7b91
commit
964d7e193c
3 changed files with 6 additions and 3 deletions
libtransmission
|
@ -57,4 +57,8 @@ typedef struct
|
||||||
}
|
}
|
||||||
tr_peer_event;
|
tr_peer_event;
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#define EMSGSIZE WSAEMSGSIZE
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -993,8 +993,7 @@ peerCallbackFunc( void * vpeer,
|
||||||
addStrike( t, peer );
|
addStrike( t, peer );
|
||||||
peer->doPurge = 1;
|
peer->doPurge = 1;
|
||||||
}
|
}
|
||||||
else if( ( e->err == EPROTO )
|
else if( ( e->err == ERANGE )
|
||||||
|| ( e->err == ERANGE )
|
|
||||||
|| ( e->err == EMSGSIZE )
|
|| ( e->err == EMSGSIZE )
|
||||||
|| ( e->err == ENOTCONN ) )
|
|| ( e->err == ENOTCONN ) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1431,7 +1431,7 @@ readBtMessage( tr_peermsgs * msgs,
|
||||||
{
|
{
|
||||||
dbgmsg( msgs, "bad packet - BT message #%d with a length of %d",
|
dbgmsg( msgs, "bad packet - BT message #%d with a length of %d",
|
||||||
(int)id, (int)msglen );
|
(int)id, (int)msglen );
|
||||||
fireError( msgs, EPROTO );
|
fireError( msgs, EMSGSIZE );
|
||||||
return READ_ERR;
|
return READ_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue