control/controlclient: make Status.Persist a PersistView

Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
Maisem Ali
2022-11-10 19:43:59 +05:00
committed by Maisem Ali
parent 4d330bac14
commit f00a49667d
6 changed files with 25 additions and 15 deletions
+2 -2
View File
@@ -580,7 +580,7 @@ func (c *Auto) sendStatus(who string, err error, url string, nm *netmap.NetworkM
c.logf("[v1] sendStatus: %s: %v", who, state)
var p *persist.Persist
var p *persist.PersistView
var loginFin, logoutFin *empty.Message
if state == StateAuthenticated {
loginFin = new(empty.Message)
@@ -590,7 +590,7 @@ func (c *Auto) sendStatus(who string, err error, url string, nm *netmap.NetworkM
}
if nm != nil && loggedIn && synced {
pp := c.direct.GetPersist()
p = pp.AsStruct()
p = &pp
} else {
// don't send netmap status, as it's misleading when we're
// not logged in.