From 004d30337bdddd7c77ab46124293da9877518a9d Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Fri, 18 Feb 2011 00:41:32 +0000 Subject: [PATCH] when sending PEX messages, unset the holepunch flag because we don't support holepunch. --- libtransmission/peer-msgs.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libtransmission/peer-msgs.c b/libtransmission/peer-msgs.c index b6edf1a84..51cd38655 100644 --- a/libtransmission/peer-msgs.c +++ b/libtransmission/peer-msgs.c @@ -2247,10 +2247,11 @@ sendPex( tr_peermsgs * msgs ) tr_bencDictAddRaw( &val, "added", tmp, walk - tmp ); tr_free( tmp ); - /* "added.f" */ + /* "added.f" + * unset each holepunch flag because we don't support it. */ tmp = walk = tr_new( uint8_t, diffs.addedCount ); for( i = 0; i < diffs.addedCount; ++i ) - *walk++ = diffs.added[i].flags; + *walk++ = diffs.added[i].flags & ~ADDED_F_HOLEPUNCH; assert( ( walk - tmp ) == diffs.addedCount ); tr_bencDictAddRaw( &val, "added.f", tmp, walk - tmp ); tr_free( tmp ); @@ -2283,10 +2284,11 @@ sendPex( tr_peermsgs * msgs ) tr_bencDictAddRaw( &val, "added6", tmp, walk - tmp ); tr_free( tmp ); - /* "added6.f" */ + /* "added6.f" + * unset each holepunch flag because we don't support it. */ tmp = walk = tr_new( uint8_t, diffs6.addedCount ); for( i = 0; i < diffs6.addedCount; ++i ) - *walk++ = diffs6.added[i].flags; + *walk++ = diffs6.added[i].flags & ~ADDED_F_HOLEPUNCH; assert( ( walk - tmp ) == diffs6.addedCount ); tr_bencDictAddRaw( &val, "added6.f", tmp, walk - tmp ); tr_free( tmp );