Changeset 13948


Ignore:
Timestamp:
Feb 3, 2013, 10:45:32 PM (8 years ago)
Author:
jordan
Message:

move tr_peer.encryptionPreference to tr_peermsgs.encryptionPreference

Location:
trunk/libtransmission
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-common.h

    r13947 r13948  
    113113  uint8_t strikes;
    114114
    115   uint8_t encryption_preference;
    116 
    117115  /* how many requests the peer has made that we haven't responded to yet */
    118116  int pendingReqsToClient;
     
    122120
    123121  struct tr_peerIo * io;
     122
     123  /* Hook to private peer-mgr information */
    124124  struct peer_atom * atom;
    125125
  • trunk/libtransmission/peer-mgr.h

    r13947 r13948  
    7070struct tr_peermsgs;
    7171
    72 enum
    73 {
    74   ENCRYPTION_PREFERENCE_UNKNOWN,
    75   ENCRYPTION_PREFERENCE_YES,
    76   ENCRYPTION_PREFERENCE_NO
    77 };
    78 
    7972/* opaque forward declaration */
    8073struct peer_atom;
  • trunk/libtransmission/peer-msgs.c

    r13947 r13948  
    105105};
    106106
     107typedef enum
     108{
     109  ENCRYPTION_PREFERENCE_UNKNOWN,
     110  ENCRYPTION_PREFERENCE_YES,
     111  ENCRYPTION_PREFERENCE_NO
     112}
     113encryption_preference_t;
     114
     115
     116
    107117/**
    108118***
     
    180190    tr_port         dht_port;
    181191
    182     size_t          metadata_size_hint;
     192    encryption_preference_t  encryption_preference;
     193
     194    size_t                   metadata_size_hint;
    183195#if 0
    184196    size_t                 fastsetSize;
     
    884896    /* does the peer prefer encrypted connections? */
    885897    if (tr_variantDictFindInt (&val, TR_KEY_e, &i)) {
    886         msgs->peer->encryption_preference = i ? ENCRYPTION_PREFERENCE_YES
    887                                               : ENCRYPTION_PREFERENCE_NO;
     898        msgs->encryption_preference = i ? ENCRYPTION_PREFERENCE_YES
     899                                        : ENCRYPTION_PREFERENCE_NO;
    888900        if (i)
    889901            pex.flags |= ADDED_F_ENCRYPTION_FLAG;
Note: See TracChangeset for help on using the changeset viewer.