Changeset 1248


Ignore:
Timestamp:
Dec 18, 2006, 3:45:22 AM (15 years ago)
Author:
joshe
Message:

Add peer's port to tr_peer_stat_t.

Location:
trunk/libtransmission
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer.c

    r1064 r1248  
    538538
    539539/***********************************************************************
    540  * tr_peerIsDownloading
     540 * tr_peerProgress
    541541 ***********************************************************************
    542542 *
     
    545545{
    546546    return peer->progress;
     547}
     548
     549/***********************************************************************
     550 * tr_peerPort
     551 ***********************************************************************
     552 * Returns peer's listening port in host byte order
     553 **********************************************************************/
     554int tr_peerPort( tr_peer_t * peer )
     555{
     556    return ntohs( peer->port );
    547557}
    548558
  • trunk/libtransmission/peer.h

    r1064 r1248  
    4545int         tr_peerIsDownloading ( tr_peer_t * );
    4646float       tr_peerProgress      ( tr_peer_t * );
     47int         tr_peerPort          ( tr_peer_t * );
    4748uint8_t *   tr_peerBitfield      ( tr_peer_t * );
    4849float       tr_peerDownloadRate  ( tr_peer_t * );
  • trunk/libtransmission/transmission.c

    r1244 r1248  
    585585            peers[i].client = tr_clientForId(tr_peerId(peer));
    586586           
    587             peers[i].isConnected = tr_peerIsConnected(peer);
    588             peers[i].isIncoming = tr_peerIsIncoming(peer);
    589             peers[i].isDownloading = tr_peerIsDownloading(peer);
    590             peers[i].isUploading = tr_peerIsUploading(peer);
    591             peers[i].progress = tr_peerProgress(peer);
     587            peers[i].isConnected   = tr_peerIsConnected( peer );
     588            peers[i].isIncoming    = tr_peerIsIncoming( peer );
     589            peers[i].isDownloading = tr_peerIsDownloading( peer );
     590            peers[i].isUploading   = tr_peerIsUploading( peer );
     591            peers[i].progress      = tr_peerProgress( peer );
     592            peers[i].port          = tr_peerPort( peer );
    592593        }
    593594    }
  • trunk/libtransmission/transmission.h

    r1242 r1248  
    397397    int     isUploading;
    398398    float   progress;
     399    int     port;
    399400};
    400401
Note: See TracChangeset for help on using the changeset viewer.