From fa10063d15dce3ae1940a3a43e22225bc7e0fed7 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Sat, 4 Jul 2009 20:14:03 +0000 Subject: Make attempts to access to unauthorized torrents more verbose. --- trackerlogic.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'trackerlogic.c') diff --git a/trackerlogic.c b/trackerlogic.c index 2f75b15..37cca03 100644 --- a/trackerlogic.c +++ b/trackerlogic.c @@ -80,6 +80,11 @@ size_t add_peer_to_torrent_and_return_peers( ot_hash hash, ot_peer *peer, PROTO_ if( !accesslist_hashisvalid( hash ) ) { mutex_bucket_unlock_by_hash( hash, 0 ); + if( proto == FLAG_TCP ) { + const char invalid_hash[] = "d14:failure reason63:Requested download is not authorized for use with this tracker.e"; + memcpy( reply, invalid_hash, strlen( invalid_hash ) ); + return strlen( invalid_hash ); + } return 0; } -- cgit v1.2.3