From 7c20d535c709fb4a5c5b29554fe0537b7b082d79 Mon Sep 17 00:00:00 2001 From: John Brooks Date: Sun, 16 Oct 2016 15:50:59 -0600 Subject: [PATCH] core: Fix build --- core/contactlist.go | 24 +----------------------- core/onionconnector.go | 2 ++ 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/core/contactlist.go b/core/contactlist.go index e2456ad..a84c2cc 100644 --- a/core/contactlist.go +++ b/core/contactlist.go @@ -13,9 +13,7 @@ type ContactList struct { mutex sync.RWMutex events *utils.Publisher - contacts map[int]*Contact - outboundRequests map[int]*OutboundContactRequest - inboundRequests map[int]*InboundContactRequest + contacts map[int]*Contact } func LoadContactList(core *Ricochet) (*ContactList, error) { @@ -61,26 +59,6 @@ func (this *ContactList) Contacts() []*Contact { return re } -func (this *ContactList) OutboundRequests() []*OutboundContactRequest { - this.mutex.RLock() - defer this.mutex.RUnlock() - re := make([]*OutboundContactRequest, 0, len(this.outboundRequests)) - for _, request := range this.outboundRequests { - re = append(re, request) - } - return re -} - -func (this *ContactList) InboundRequests() []*InboundContactRequest { - this.mutex.RLock() - defer this.mutex.RUnlock() - re := make([]*InboundContactRequest, 0, len(this.inboundRequests)) - for _, request := range this.inboundRequests { - re = append(re, request) - } - return re -} - func (this *ContactList) ContactById(id int) *Contact { this.mutex.RLock() defer this.mutex.RUnlock() diff --git a/core/onionconnector.go b/core/onionconnector.go index 0d2ebe8..d066732 100644 --- a/core/onionconnector.go +++ b/core/onionconnector.go @@ -50,6 +50,8 @@ func (oc *OnionConnector) Connect(address string, c context.Context) (net.Conn, for { // XXX This waits to know SOCKS info, but does not wait for connection // ready state; should it? + // XXX Also, we're supposed to change backoff when tor connectivity state + // changes, but this won't. proxy, err := oc.Network.WaitForProxyDialer(options, c) if err != nil { return nil, err