예제 #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
파일: stats.c 프로젝트: marltu/transmission
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;
    }
}