Clear utp_failed flag upon seeing an announcement for ut_holepunch.

This commit is contained in:
Juliusz Chroboczek 2011-02-18 00:43:39 +00:00
parent 07addc7d0d
commit 55b050f18e
1 changed files with 7 additions and 0 deletions

View File

@ -939,6 +939,13 @@ parseLtepHandshake( tr_peermsgs * msgs,
msgs->ut_metadata_id = (uint8_t) i;
dbgmsg( msgs, "msgs->ut_metadata_id is %d", (int)msgs->ut_metadata_id );
}
if( tr_bencDictFindInt( sub, "ut_holepunch", &i ) ) {
/* Mysterious µTorrent extension that we don't grok. However,
it implies support for µTP, so use it to indicate that. */
tr_peerMgrSetUtpFailed( msgs->torrent,
tr_peerIoGetAddress( msgs->peer->io, NULL ),
FALSE );
}
}
/* look for metainfo size (BEP 9) */