(trunk) #4032 "Better error detection / reporting in http announces" -- added to trunk.

This patch adds two new flags to the callback function -- did_connect and did_timeout -- that are calculated inside of web.c using information from libcurl. This allows the announcer to detect timeouts more accurately and also to distinguish between unresponsive peers (which get the preexisting "Tracker did not respond" error message) and unconnectable peers (which get a new error message, "Could not connect to tracker").
This commit is contained in:
Jordan Lee
2011-02-17 02:26:24 +00:00
parent e4fb51a778
commit 716a3c90c2
8 changed files with 51 additions and 8 deletions

View File

@@ -1066,6 +1066,8 @@ torrentSetLocation( tr_session * session,
static void
portTested( tr_session * session UNUSED,
tr_bool did_connect UNUSED,
tr_bool did_timeout UNUSED,
long response_code,
const void * response,
size_t response_byte_count,
@@ -1108,6 +1110,8 @@ portTest( tr_session * session,
static void
gotNewBlocklist( tr_session * session,
tr_bool did_connect UNUSED,
tr_bool did_timeout UNUSED,
long response_code,
const void * response,
size_t response_byte_count,
@@ -1252,6 +1256,8 @@ struct add_torrent_idle_data
static void
gotMetadataFromURL( tr_session * session UNUSED,
tr_bool did_connect UNUSED,
tr_bool did_timeout UNUSED,
long response_code,
const void * response,
size_t response_byte_count,