libeech

BitTorrent library
git clone git://z3bra.org/libeech.git
Log | Files | Refs | README | LICENSE

commit 073f62ba589de7076916bc88119e6bc64ff0990b
parent 1dbca24f67c51c35b0ea0c3b7e2d98b85eec5005
Author: z3bra <contactatz3bradotorg>
Date:   Sun Oct 22 10:40:29 +0200

Add comments

Diffstat:
libeech.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/libeech.c b/libeech.c @@ -116,12 +116,15 @@ glch_loadtorrent(struct torrent *t, char *b, size_t s) if (chktorrent(&t->be) < 0) return -1; + /* Calculate 'info' key checksum */ bekv(&t->be, "info", 4, &t->info); sha1(t->info.start, t->info.end - t->info.start, t->ih); + /* save tracker URL */ bekstr(&t->be, "announce", 8, &v); memcpy(t->tr, v.off, v.end - v.off); + /* Generate randomized peer ID */ memcpy(t->id, peerid(), 20); t->id[20] = 0;