torrentd

simple torrent daemon
git clone git@git.2f30.org/torrentd.git
Log | Files | Refs | LICENSE

commit 606d973333025a03cc3eab7933a62a94936cfdd0
parent 215e0c41bc61a27c66f743ab2c060f28164b4205
Author: sin <sin@2f30.org>
Date:   Mon, 21 Dec 2015 20:20:42 +0000

Use t->totallen in GET request

Diffstat:
Mtracker.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tracker.c b/tracker.c @@ -21,7 +21,7 @@ getpeers(struct torrent *t, struct ben **reply) r = snprintf(buf, sizeof(buf), "GET /%s?info_hash=%s&peer_id=%s&port=6881&uploaded=0&" "downloaded=0&left=%zu&event=started HTTP/1.1\r\n\r\n", - path, infohash, id, t->files[0].len); + path, infohash, id, t->totallen); free(id); free(infohash); free(url);