mirror of
https://github.com/transmission/transmission
synced 2025-03-06 03:28:33 +00:00
fix crash-on-exit introduced by stats code
This commit is contained in:
parent
cf85da1759
commit
033ee7ff58
2 changed files with 2 additions and 2 deletions
|
@ -119,12 +119,14 @@ tr_statsInit( tr_handle * handle )
|
||||||
stats->cumulative.sessionCount++;
|
stats->cumulative.sessionCount++;
|
||||||
stats->startTime = time(NULL);
|
stats->startTime = time(NULL);
|
||||||
handle->sessionStats = stats;
|
handle->sessionStats = stats;
|
||||||
|
fprintf( stderr, "handle %p sessionStats is %p\n", handle, handle->sessionStats );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tr_statsClose( tr_handle * handle )
|
tr_statsClose( tr_handle * handle )
|
||||||
{
|
{
|
||||||
tr_session_stats tmp;
|
tr_session_stats tmp;
|
||||||
|
fprintf( stderr, "handle %p sessionStats is %p\n", handle, handle->sessionStats );
|
||||||
tr_getCumulativeSessionStats( handle, &tmp );
|
tr_getCumulativeSessionStats( handle, &tmp );
|
||||||
saveCumulativeStats( &tmp );
|
saveCumulativeStats( &tmp );
|
||||||
|
|
||||||
|
|
|
@ -326,8 +326,6 @@ tr_closeImpl( void * vh )
|
||||||
for( t=h->torrentList; t!=NULL; t=t->next )
|
for( t=h->torrentList; t!=NULL; t=t->next )
|
||||||
tr_torrentClose( t );
|
tr_torrentClose( t );
|
||||||
|
|
||||||
tr_statsClose( h );
|
|
||||||
|
|
||||||
tr_peerMgrFree( h->peerMgr );
|
tr_peerMgrFree( h->peerMgr );
|
||||||
|
|
||||||
tr_rcClose( h->upload );
|
tr_rcClose( h->upload );
|
||||||
|
|
Loading…
Add table
Reference in a new issue