ipn: make Notify.Prefs be a *ipn.PrefsView

It is currently a `ipn.PrefsView` which means when we do a JSON roundtrip,
we go from an invalid Prefs to a valid one.

This makes it a pointer, which fixes the JSON roundtrip.

This was introduced in 0957bc5af2.

Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
Maisem Ali
2022-11-04 03:46:17 +05:00
committed by Maisem Ali
parent c3a5489e72
commit 6afe26575c
6 changed files with 32 additions and 9 deletions

View File

@@ -316,7 +316,7 @@ func TestStateMachine(t *testing.T) {
b.SetNotifyCallback(func(n ipn.Notify) {
if n.State != nil ||
n.Prefs.Valid() ||
(n.Prefs != nil && n.Prefs.Valid()) ||
n.BrowseToURL != nil ||
n.LoginFinished != nil {
logf("\n%v\n\n", n)