From d31f74b14c66f5674b2e2f29730edd34ac95d2df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Tue, 3 Jan 2023 23:31:41 +0100 Subject: idea for metadl via tcp for outgoing connections implemented, not tested, compiles --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index e659e6b..70b4d3e 100644 --- a/src/main.c +++ b/src/main.c @@ -85,7 +85,7 @@ int main (int argc, char ** argv) { dht = dht_init(config); dht->possible_torrent = found_torrent; free_bencoding(config); - struct torrent * torrent = calloc(1, sizeof *torrent); + struct torrent * torrent = torrent_init(); memcpy(torrent->hash, "\xdd\x82\x55\xec\xdc\x7c\xa5\x5f\xb0\xbb\xf8\x13\x23\xd8\x70\x62\xdb\x1f\x6d\x1c", 20); torrent->type = announce | peers; add_torrent(dht, torrent); -- cgit v1.2.3