(trunk libT) possible fix for #2297 by removing potential thread issue in tr_torrentVerify()
This commit is contained in:
parent
c88dd2de12
commit
97ca8eab39
|
@ -1323,9 +1323,11 @@ torrentRecheckDoneCB( tr_torrent * tor )
|
|||
tr_runInEventThread( tor->session, torrentRecheckDoneImpl, tor );
|
||||
}
|
||||
|
||||
void
|
||||
tr_torrentVerify( tr_torrent * tor )
|
||||
static void
|
||||
verifyTorrent( void * vtor )
|
||||
{
|
||||
tr_torrent * tor = vtor;
|
||||
|
||||
assert( tr_isTorrent( tor ) );
|
||||
tr_globalLock( tor->session );
|
||||
|
||||
|
@ -1345,6 +1347,13 @@ tr_torrentVerify( tr_torrent * tor )
|
|||
tr_globalUnlock( tor->session );
|
||||
}
|
||||
|
||||
void
|
||||
tr_torrentVerify( tr_torrent * tor )
|
||||
{
|
||||
if( tr_isTorrent( tor ) )
|
||||
tr_runInEventThread( tor->session, verifyTorrent, tor );
|
||||
}
|
||||
|
||||
static void
|
||||
stopTorrent( void * vtor )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue