Ignore:
Timestamp:
Mar 10, 2011, 12:35:23 PM (11 years ago)
Author:
jordan
Message:

(trunk libT) Add an enumeration for the peer id length. Use that enum for the peer_id fields in tr_session and tr_torrent.

This also avoids an extra malloc/free per-torrent and per-session, but mostly this tweak is for the extra readability of the PEER_ID_LEN=20 enum.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.h

    r12096 r12121  
    158158     * and in the handshake are expected to match.
    159159     */
    160     uint8_t * peer_id;
     160    uint8_t peer_id[PEER_ID_LEN+1];
    161161
    162162    /* Where the files will be when it's complete */
Note: See TracChangeset for help on using the changeset viewer.