Ignore:
Timestamp:
Apr 13, 2008, 10:31:07 PM (14 years ago)
Author:
charles
Message:

#394: resume files should use original name instead of hash name

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/stats.c

    r5517 r5608  
    3838    if( !tr_bencLoad( content, len, &top, NULL ) )
    3939    {
    40         const tr_benc * val;
    41 
    42         if(( val = tr_bencDictFindType( &top, "uploaded-bytes", TYPE_INT )))
    43             setme->uploadedBytes = (uint64_t) tr_bencGetInt( val );
    44 
    45         if(( val = tr_bencDictFindType( &top, "downloaded-bytes", TYPE_INT )))
    46             setme->downloadedBytes = (uint64_t) tr_bencGetInt( val );
    47 
    48         if(( val = tr_bencDictFindType( &top, "files-added", TYPE_INT )))
    49             setme->filesAdded = (uint64_t) tr_bencGetInt( val );
    50 
    51         if(( val = tr_bencDictFindType( &top, "session-count", TYPE_INT )))
    52             setme->sessionCount = (uint64_t) tr_bencGetInt( val );
    53 
    54         if(( val = tr_bencDictFindType( &top, "seconds-active", TYPE_INT )))
    55             setme->secondsActive = (uint64_t) tr_bencGetInt( val );
     40        int64_t i;
     41
     42        if( tr_bencDictFindInt( &top, "uploaded-bytes", &i ) )
     43            setme->uploadedBytes = (uint64_t) i;
     44
     45        if( tr_bencDictFindInt( &top, "downloaded-bytes", &i ) )
     46            setme->downloadedBytes = (uint64_t) i;
     47
     48        if( tr_bencDictFindInt( &top, "files-added", &i ) )
     49            setme->filesAdded = (uint64_t) i;
     50
     51        if( tr_bencDictFindInt( &top, "session-count", &i ) )
     52            setme->sessionCount = (uint64_t) i;
     53
     54        if( tr_bencDictFindInt( &top, "seconds-active", &i ) )
     55            setme->secondsActive = (uint64_t) i;
    5656
    5757        tr_bencFree( &top );
Note: See TracChangeset for help on using the changeset viewer.