torrentd

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

commit 720b738c057095e1307a4e2f2e3d193be9fe8a51
parent ee8fa81f48db069fa0b48f148dd5a3f63e760440
Author: sin <sin@2f30.org>
Date:   Sat, 26 Dec 2015 16:52:29 +0000

Add PORT define

Diffstat:
Mstorrent.h | 2++
Mtracker.c | 5+++--
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/storrent.h b/storrent.h @@ -1,4 +1,6 @@ /* See LICENSE file for copyright and license details. */ +#define PORT 49155 + enum { EVSTARTED, EVCOMPLETED, diff --git a/tracker.c b/tracker.c @@ -110,9 +110,10 @@ trackerget(struct torrent *t, int event) } r = snprintf(buf, sizeof(buf), - "%s?info_hash=%s&peer_id=%s&port=6881&uploaded=0&" + "%s?info_hash=%s&peer_id=%s&port=%d&uploaded=0&" "downloaded=0&left=%zu&compact=1&event=%s", - t->announcers[0].urls[0], infohash, id, t->totallen, ev); + t->announcers[0].urls[0], infohash, id, PORT, + t->totallen, ev); if (r < 0 || (size_t)r >= sizeof(buf)) { r = -1; goto err2;