Ignore:
Timestamp:
Jan 22, 2011, 5:45:54 PM (10 years ago)
Author:
jordan
Message:

(trunk libT) #3933 "announcer.c peer parsing could be simpler" -- fixed.

Remove redundant code by using tr_peerMgrCompactToPex() and tr_peerMgrCompact6ToPex() to parse compact ipv4 and ipv6 peer lists. Simplify the old-style benc peer list parsing and fix a bug that returned too few bytes in the old-style peer array.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/announcer.h

    r11709 r11750  
    3636TrackerEventType;
    3737
     38struct tr_pex;
     39
    3840/** @brief Notification object to tell listeners about announce or scrape occurences */
    3941typedef struct
     
    4749
    4850    /* for TR_TRACKER_PEERS */
    49     const uint8_t *  compact;
    50     int              compactLen;
     51    const struct tr_pex * pex;
     52    size_t pexCount;
    5153
    5254    /* [0...100] for probability a peer is a seed. calculated by the leecher/seeder ratio */
Note: See TracChangeset for help on using the changeset viewer.