torrentd

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

commit ab5dc97e8c561fd52315b7c87ea5fc70e235e67d
parent 24b165fc21f693e6d252453a82f4db0c682c8d0b
Author: sin <sin@2f30.org>
Date:   Mon, 21 Dec 2015 20:13:17 +0000

Fix len

Diffstat:
Mtracker.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tracker.c b/tracker.c @@ -36,10 +36,10 @@ tracker_get_peers(struct torrent *t, struct ben **reply) if ((p = strstr(buf, "\r\n\r\n"))) { p += 4; - r -= 4; + r -= (p - buf); } else if ((p = strstr(buf, "\n\n"))) { p += 2; - r -= 2; + r -= (p - buf); } else { p = buf; }