Changeset 7696
- Timestamp:
- Jan 13, 2009, 4:43:38 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/rpcimpl.c
r7658 r7696 688 688 tr_benc * args_out ) 689 689 { 690 tr_benc * d; 691 tr_torrent * tor; 692 int running; 693 int total; 694 695 tor = NULL; 696 total = running = 0; 690 int running = 0; 691 int total = 0; 692 tr_torrent * tor = NULL; 693 697 694 while(( tor = tr_torrentNext( session, tor ))) { 698 695 ++total; … … 701 698 } 702 699 703 d = tr_bencDictAddDict( args_out, "session-stats", 5 ); 704 tr_bencDictAddInt( d, "activeTorrentCount", running ); 705 tr_bencDictAddInt( d, "downloadSpeed", (int)( tr_sessionGetPieceSpeed( session, TR_DOWN ) * 1024 ) ); 706 tr_bencDictAddInt( d, "pausedTorrentCount", total - running ); 707 tr_bencDictAddInt( d, "torrentCount", total ); 708 tr_bencDictAddInt( d, "uploadSpeed", (int)( tr_sessionGetPieceSpeed( session, TR_UP ) * 1024 ) ); 700 tr_bencDictAddInt( args_out, "activeTorrentCount", running ); 701 tr_bencDictAddInt( args_out, "downloadSpeed", (int)( tr_sessionGetPieceSpeed( session, TR_DOWN ) * 1024 ) ); 702 tr_bencDictAddInt( args_out, "pausedTorrentCount", total - running ); 703 tr_bencDictAddInt( args_out, "torrentCount", total ); 704 tr_bencDictAddInt( args_out, "uploadSpeed", (int)( tr_sessionGetPieceSpeed( session, TR_UP ) * 1024 ) ); 709 705 return NULL; 710 706 }
Note: See TracChangeset
for help on using the changeset viewer.