Changeset 7696


Ignore:
Timestamp:
Jan 13, 2009, 4:43:38 AM (12 years ago)
Author:
charles
Message:

(trunk libT) #1655: rpc-spec 4.2: "session-stats" returns a new object instead of the response arguments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/rpcimpl.c

    r7658 r7696  
    688688              tr_benc     * args_out )
    689689{
    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
    697694    while(( tor = tr_torrentNext( session, tor ))) {
    698695        ++total;
     
    701698    }
    702699
    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 ) );
    709705    return NULL;
    710706}
Note: See TracChangeset for help on using the changeset viewer.