Changeset 7736


Ignore:
Timestamp:
Jan 17, 2009, 4:44:16 PM (12 years ago)
Author:
charles
Message:

(trunk daemon) #1707: Show peer progress in --peers view

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/remote.c

    r7732 r7736  
    964964{
    965965    int i, n;
    966     printf( "%-20s  %-12s  %-6s  %-6s  %s\n",
    967             "Address", "Flags", "Down", "Up", "Client" );
     966    printf( "%-20s  %-12s  %-5s %-6s  %-6s  %s\n",
     967            "Address", "Flags", "Done", "Down", "Up", "Client" );
    968968    for( i = 0, n = tr_bencListSize( peers ); i < n; ++i )
    969969    {
     970        double progress;
    970971        const char * address, * client, * flagstr;
    971         int64_t      rateToClient, rateToPeer;
    972         tr_benc *    d = tr_bencListChild( peers, i );
     972        int64_t rateToClient, rateToPeer;
     973        tr_benc * d = tr_bencListChild( peers, i );
     974
    973975        if( tr_bencDictFindStr( d, "address", &address )
    974976          && tr_bencDictFindStr( d, "clientName", &client )
     977          && tr_bencDictFindDouble( d, "progress", &progress )
    975978          && tr_bencDictFindStr( d, "flagStr", &flagstr )
    976979          && tr_bencDictFindInt( d, "rateToClient", &rateToClient )
    977980          && tr_bencDictFindInt( d, "rateToPeer", &rateToPeer ) )
    978981        {
    979             printf( "%-20s  %-12s  %6.1f  %6.1f  %s\n",
    980                     address, flagstr,
     982            printf( "%-20s  %-12s  %-5.1f %6.1f  %6.1f  %s\n",
     983                    address, flagstr, (progress*100.0),
    981984                    rateToClient / 1024.0,
    982985                    rateToPeer / 1024.0,
Note: See TracChangeset for help on using the changeset viewer.