mirror of
https://github.com/transmission/transmission
synced 2025-03-10 22:22:58 +00:00
(trunk libT) possible fix for #2297 by removing potential thread issue in tr_torrentVerify()
This commit is contained in:
parent
c88dd2de12
commit
97ca8eab39
1 changed files with 11 additions and 2 deletions
|
@ -1323,9 +1323,11 @@ torrentRecheckDoneCB( tr_torrent * tor )
|
||||||
tr_runInEventThread( tor->session, torrentRecheckDoneImpl, tor );
|
tr_runInEventThread( tor->session, torrentRecheckDoneImpl, tor );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
tr_torrentVerify( tr_torrent * tor )
|
verifyTorrent( void * vtor )
|
||||||
{
|
{
|
||||||
|
tr_torrent * tor = vtor;
|
||||||
|
|
||||||
assert( tr_isTorrent( tor ) );
|
assert( tr_isTorrent( tor ) );
|
||||||
tr_globalLock( tor->session );
|
tr_globalLock( tor->session );
|
||||||
|
|
||||||
|
@ -1345,6 +1347,13 @@ tr_torrentVerify( tr_torrent * tor )
|
||||||
tr_globalUnlock( tor->session );
|
tr_globalUnlock( tor->session );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
tr_torrentVerify( tr_torrent * tor )
|
||||||
|
{
|
||||||
|
if( tr_isTorrent( tor ) )
|
||||||
|
tr_runInEventThread( tor->session, verifyTorrent, tor );
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
stopTorrent( void * vtor )
|
stopTorrent( void * vtor )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue