Changeset 5608 for trunk/libtransmission/stats.c
- Timestamp:
- Apr 13, 2008, 10:31:07 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/stats.c
r5517 r5608 38 38 if( !tr_bencLoad( content, len, &top, NULL ) ) 39 39 { 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; 56 56 57 57 tr_bencFree( &top );
Note: See TracChangeset
for help on using the changeset viewer.