diff --git a/libtransmission/peer-mgr.h b/libtransmission/peer-mgr.h index 1cf07677d..4add0664f 100644 --- a/libtransmission/peer-mgr.h +++ b/libtransmission/peer-mgr.h @@ -51,7 +51,7 @@ enum typedef struct tr_pex { tr_address addr; - tr_port port; + tr_port port; /* this field is in network byte order */ uint8_t flags; } tr_pex; diff --git a/libtransmission/peer-msgs.c b/libtransmission/peer-msgs.c index 814e1ed09..ac19dec41 100644 --- a/libtransmission/peer-msgs.c +++ b/libtransmission/peer-msgs.c @@ -975,8 +975,8 @@ parseLtepHandshake( tr_peermsgs * msgs, /* get peer's listening port */ if( tr_bencDictFindInt( &val, "p", &i ) ) { - fireClientGotPort( msgs, (tr_port)i ); pex.port = htons( (uint16_t)i ); + fireClientGotPort( msgs, pex.port ); dbgmsg( msgs, "peer's port is now %d", (int)i ); } diff --git a/libtransmission/resume.c b/libtransmission/resume.c index 4ff6f0be6..cef4a3d38 100644 --- a/libtransmission/resume.c +++ b/libtransmission/resume.c @@ -34,8 +34,8 @@ #define KEY_INCOMPLETE_DIR "incomplete-dir" #define KEY_MAX_PEERS "max-peers" #define KEY_PAUSED "paused" -#define KEY_PEERS "peers" -#define KEY_PEERS6 "peers6" +#define KEY_PEERS "peers2" +#define KEY_PEERS6 "peers2-6" #define KEY_FILE_PRIORITIES "priority" #define KEY_BANDWIDTH_PRIORITY "bandwidth-priority" #define KEY_PROGRESS "progress"