remove tr_peerMsgsSetChoke()'s return value, which was always ignored anyway

This commit is contained in:
Charles Kerr 2007-10-17 18:23:59 +00:00
parent 0a285a36a8
commit 911ff1cdd1
2 changed files with 2 additions and 7 deletions

View File

@ -390,10 +390,9 @@ updateInterest( tr_peermsgs * msgs )
#define MIN_CHOKE_PERIOD_SEC 10
int
void
tr_peerMsgsSetChoke( tr_peermsgs * msgs, int choke )
{
int ret;
const time_t fibrillationTime = time(NULL) - MIN_CHOKE_PERIOD_SEC;
assert( msgs != NULL );
@ -403,7 +402,6 @@ tr_peerMsgsSetChoke( tr_peermsgs * msgs, int choke )
if( msgs->info->chokeChangedAt > fibrillationTime )
{
dbgmsg( msgs, "Not changing choke to %d to avoid fibrillation", choke );
ret = FALSE;
}
else if( msgs->info->peerIsChoked != choke )
{
@ -428,10 +426,7 @@ tr_peerMsgsSetChoke( tr_peermsgs * msgs, int choke )
protocolSendChoke( msgs, choke );
msgs->info->chokeChangedAt = time( NULL );
ret = TRUE;
}
return ret;
}
/**

View File

@ -29,7 +29,7 @@ tr_peermsgs* tr_peerMsgsNew( struct tr_torrent * torrent,
tr_publisher_tag * setme );
int tr_peerMsgsSetChoke( tr_peermsgs *, int doChoke );
void tr_peerMsgsSetChoke( tr_peermsgs *, int doChoke );
void tr_peerMsgsHave( tr_peermsgs * msgs,
uint32_t pieceIndex );