Unexport/modify some interfaces to revive broken iOS/Android builds

This commit is contained in:
Neil Alexander 2019-03-30 00:09:35 +00:00
parent 4c0c3a23cb
commit 39baf7365c
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
7 changed files with 26 additions and 36 deletions

View file

@ -23,8 +23,7 @@ type link struct {
reconfigure chan chan error
mutex sync.RWMutex // protects interfaces below
interfaces map[linkInfo]*linkInterface
awdl awdl // AWDL interface support
tcp tcp // TCP interface support
tcp tcp // TCP interface support
// TODO timeout (to remove from switch), read from config.ReadTimeout
}
@ -68,26 +67,15 @@ func (l *link) init(c *Core) error {
return err
}
if err := l.awdl.init(l); err != nil {
c.log.Errorln("Failed to start AWDL interface")
return err
}
go func() {
for {
e := <-l.reconfigure
tcpresponse := make(chan error)
awdlresponse := make(chan error)
l.tcp.reconfigure <- tcpresponse
if err := <-tcpresponse; err != nil {
e <- err
continue
}
l.awdl.reconfigure <- awdlresponse
if err := <-awdlresponse; err != nil {
e <- err
continue
}
e <- nil
}
}()