fix "manual update" crash reported by Gimp_ and BentMyWookie

This commit is contained in:
Charles Kerr 2007-11-20 16:50:48 +00:00
parent d96f0b629b
commit 172efd42fa
1 changed files with 8 additions and 2 deletions

View File

@ -659,11 +659,17 @@ tr_torrentDisablePex( tr_torrent * tor, int disable )
tor->pexDisabled = disable;
}
static void
tr_manualUpdateImpl( void * vtor )
{
tr_torrent * tor = vtor;
if( tor->isRunning )
tr_trackerReannounce( tor->tracker );
}
void
tr_manualUpdate( tr_torrent * tor )
{
if( tor->isRunning )
tr_trackerReannounce( tor->tracker );
tr_runInEventThread( tor->handle, tr_manualUpdateImpl, tor );
}
int
tr_torrentCanManualUpdate( const tr_torrent * tor )