]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Pass key param in http announces
authorMatt Joiner <anacrolix@gmail.com>
Thu, 1 Oct 2020 00:45:29 +0000 (10:45 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Thu, 1 Oct 2020 00:45:29 +0000 (10:45 +1000)
tracker/http.go

index 328c08322ba8e6cb1ac5339fce3d01f0e9eb6533..caf0cff64d9fee2dffa446de5c9818fc730fd87e 100644 (file)
@@ -70,6 +70,7 @@ func (me *Peers) UnmarshalBencode(b []byte) (err error) {
 func setAnnounceParams(_url *url.URL, ar *AnnounceRequest, opts Announce) {
        q := _url.Query()
 
+       q.Set("key", strconv.FormatInt(int64(ar.Key), 10))
        q.Set("info_hash", string(ar.InfoHash[:]))
        q.Set("peer_id", string(ar.PeerId[:]))
        // AFAICT, port is mandatory, and there's no implied port key.