remove tr_peerMsgsSetChoke()'s return value, which was always ignored anyway
This commit is contained in:
parent
0a285a36a8
commit
911ff1cdd1
|
@ -390,10 +390,9 @@ updateInterest( tr_peermsgs * msgs )
|
||||||
|
|
||||||
#define MIN_CHOKE_PERIOD_SEC 10
|
#define MIN_CHOKE_PERIOD_SEC 10
|
||||||
|
|
||||||
int
|
void
|
||||||
tr_peerMsgsSetChoke( tr_peermsgs * msgs, int choke )
|
tr_peerMsgsSetChoke( tr_peermsgs * msgs, int choke )
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
const time_t fibrillationTime = time(NULL) - MIN_CHOKE_PERIOD_SEC;
|
const time_t fibrillationTime = time(NULL) - MIN_CHOKE_PERIOD_SEC;
|
||||||
|
|
||||||
assert( msgs != NULL );
|
assert( msgs != NULL );
|
||||||
|
@ -403,7 +402,6 @@ tr_peerMsgsSetChoke( tr_peermsgs * msgs, int choke )
|
||||||
if( msgs->info->chokeChangedAt > fibrillationTime )
|
if( msgs->info->chokeChangedAt > fibrillationTime )
|
||||||
{
|
{
|
||||||
dbgmsg( msgs, "Not changing choke to %d to avoid fibrillation", choke );
|
dbgmsg( msgs, "Not changing choke to %d to avoid fibrillation", choke );
|
||||||
ret = FALSE;
|
|
||||||
}
|
}
|
||||||
else if( msgs->info->peerIsChoked != choke )
|
else if( msgs->info->peerIsChoked != choke )
|
||||||
{
|
{
|
||||||
|
@ -428,10 +426,7 @@ tr_peerMsgsSetChoke( tr_peermsgs * msgs, int choke )
|
||||||
|
|
||||||
protocolSendChoke( msgs, choke );
|
protocolSendChoke( msgs, choke );
|
||||||
msgs->info->chokeChangedAt = time( NULL );
|
msgs->info->chokeChangedAt = time( NULL );
|
||||||
ret = TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -29,7 +29,7 @@ tr_peermsgs* tr_peerMsgsNew( struct tr_torrent * torrent,
|
||||||
tr_publisher_tag * setme );
|
tr_publisher_tag * setme );
|
||||||
|
|
||||||
|
|
||||||
int tr_peerMsgsSetChoke( tr_peermsgs *, int doChoke );
|
void tr_peerMsgsSetChoke( tr_peermsgs *, int doChoke );
|
||||||
|
|
||||||
void tr_peerMsgsHave( tr_peermsgs * msgs,
|
void tr_peerMsgsHave( tr_peermsgs * msgs,
|
||||||
uint32_t pieceIndex );
|
uint32_t pieceIndex );
|
||||||
|
|
Loading…
Reference in New Issue