From 2d3718151d4f4248618f5c9f3ea5765f91f39eef Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Fri, 16 Jan 2009 04:17:22 +0000 Subject: Fix a pointer arithmetic issue leading to incorrect peer data being copied. Allocate correct size for debugbuffer. Expect exact values on find keywords, not only prefix match. --- ot_http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ot_http.c') diff --git a/ot_http.c b/ot_http.c index 3ccdb84..bc3aef0 100644 --- a/ot_http.c +++ b/ot_http.c @@ -247,7 +247,7 @@ static ssize_t http_handle_fullscrape( const int64 sock, struct ot_workstruct *w stats_issue_event( EVENT_FULLSCRAPE_REQUEST, 0, (uintptr_t)cookie->ip ); #ifdef _DEBUG_HTTPERROR -write( 2, ws->debugbuf, G_DEBUGBUF_SIZE ); + fprintf( stderr, "%s", ws->debugbuf ); #endif /* Pass this task to the worker thread */ @@ -299,7 +299,7 @@ static ssize_t http_handle_scrape( const int64 sock, struct ot_workstruct *ws, c return ws->reply_size; } -static ot_keywords keywords_announce[] = { { "port", 1 }, { "left", 2 }, { "event", 3 }, { "numwant", 4 }, { "compact", 5 }, { "info_hash", 6 }, +static ot_keywords keywords_announce[] = { { "port", 1 }, { "left", 2 }, { "event", 3 }, { "numwant", 4 }, { "compact", 5 }, { "compact6", 5 }, { "info_hash", 6 }, #ifdef WANT_IP_FROM_QUERY_STRING { "ip", 7 }, #endif -- cgit v1.2.3