mirror of
https://github.com/transmission/transmission
synced 2025-02-22 06:00:41 +00:00
(trunk libT) #3320 "If the seed ratio is already met" -- fix a bug in r10848 reported by BMW
This commit is contained in:
parent
3797966cb6
commit
7638e44724
2 changed files with 8 additions and 8 deletions
|
@ -1616,7 +1616,7 @@ getCompletionString( int type )
|
|||
static void
|
||||
fireCompletenessChange( tr_torrent * tor,
|
||||
tr_completeness status,
|
||||
tr_bool wasPaused )
|
||||
tr_bool wasRunning )
|
||||
{
|
||||
assert( tr_isTorrent( tor ) );
|
||||
assert( ( status == TR_LEECH )
|
||||
|
@ -1624,7 +1624,7 @@ fireCompletenessChange( tr_torrent * tor,
|
|||
|| ( status == TR_PARTIAL_SEED ) );
|
||||
|
||||
if( tor->completeness_func )
|
||||
tor->completeness_func( tor, status, wasPaused,
|
||||
tor->completeness_func( tor, status, wasRunning,
|
||||
tor->completeness_func_user_data );
|
||||
}
|
||||
|
||||
|
@ -1704,7 +1704,7 @@ torrentCallScript( tr_torrent * tor, const char * script )
|
|||
void
|
||||
tr_torrentRecheckCompleteness( tr_torrent * tor )
|
||||
{
|
||||
tr_bool wasPaused;
|
||||
tr_bool wasRunning;
|
||||
tr_completeness completeness;
|
||||
|
||||
assert( tr_isTorrent( tor ) );
|
||||
|
@ -1712,7 +1712,7 @@ tr_torrentRecheckCompleteness( tr_torrent * tor )
|
|||
tr_torrentLock( tor );
|
||||
|
||||
completeness = tr_cpGetStatus( &tor->completion );
|
||||
wasPaused = tor->isRunning;
|
||||
wasRunning = tor->isRunning;
|
||||
|
||||
if( completeness != tor->completeness )
|
||||
{
|
||||
|
@ -1745,7 +1745,7 @@ tr_torrentRecheckCompleteness( tr_torrent * tor )
|
|||
torrentCallScript( tor, tr_sessionGetTorrentDoneScript( tor->session ) );
|
||||
}
|
||||
|
||||
fireCompletenessChange( tor, wasPaused, completeness );
|
||||
fireCompletenessChange( tor, wasRunning, completeness );
|
||||
|
||||
tr_torrentSetDirty( tor );
|
||||
}
|
||||
|
|
|
@ -1275,12 +1275,12 @@ typedef enum
|
|||
tr_completeness;
|
||||
|
||||
/**
|
||||
* @param wasPaused whether or not the torrent was in a paused state when
|
||||
* it changed its completeness state
|
||||
* @param wasRunning whether or not the torrent was running when
|
||||
* it changed its completeness state
|
||||
*/
|
||||
typedef void ( tr_torrent_completeness_func )( tr_torrent * torrent,
|
||||
tr_completeness completeness,
|
||||
tr_bool wasPaused,
|
||||
tr_bool wasRunning,
|
||||
void * user_data );
|
||||
|
||||
typedef void ( tr_torrent_ratio_limit_hit_func )( tr_torrent * torrent,
|
||||
|
|
Loading…
Reference in a new issue