From d1f3a885a5aca4eef168a7017f149b7eec474578 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Fri, 11 Mar 2011 15:00:10 +0000 Subject: [PATCH] (trunk libT) ensure that a tr_torrent's peer id is initialized when the tr_torrent is constructed --- libtransmission/torrent.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libtransmission/torrent.c b/libtransmission/torrent.c index 5497f2e0b..997aa60fc 100644 --- a/libtransmission/torrent.c +++ b/libtransmission/torrent.c @@ -812,6 +812,8 @@ torrentInit( tr_torrent * tor, const tr_ctor * ctor ) tor->uniqueId = nextUniqueId++; tor->magicNumber = TORRENT_MAGIC_NUMBER; + tr_peerIdInit( tor->peer_id ); + tr_sha1( tor->obfuscatedHash, "req2", 4, tor->info.hash, SHA_DIGEST_LENGTH, NULL ); -- 2.40.0