void tr_statsSaveDirty(tr_session* session) { struct tr_stats_handle* h = getStats(session); if (h != NULL && h->isDirty) { tr_session_stats cumulative = TR_SESSION_STATS_INIT; tr_sessionGetCumulativeStats(session, &cumulative); saveCumulativeStats(session, &cumulative); h->isDirty = false; } }
void tr_statsSaveDirty( tr_session * session ) { struct tr_stats_handle * h = getStats( session ); if( ( h != NULL ) && h->isDirty ) { tr_session_stats cumulative = STATS_INIT; tr_sessionGetCumulativeStats( session, &cumulative ); saveCumulativeStats( session, &cumulative ); h->isDirty = FALSE; } }