Пример #1
0
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;
    }
}
Пример #2
0
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;
    }
}