lib/connections: Refactor address listing into connection service

This commit is contained in:
Audrius Butkevicius
2016-03-25 07:35:18 +00:00
committed by Jakob Borg
parent 690837dbe5
commit 29913dd1e4
9 changed files with 173 additions and 202 deletions

View File

@@ -39,6 +39,7 @@ import (
"github.com/syncthing/syncthing/lib/sync"
"github.com/syncthing/syncthing/lib/tlsutil"
"github.com/syncthing/syncthing/lib/upgrade"
"github.com/syncthing/syncthing/lib/util"
"github.com/vitrun/qart/qr"
"golang.org/x/crypto/bcrypt"
)
@@ -733,7 +734,7 @@ func (s *apiService) postSystemConfig(w http.ResponseWriter, r *http.Request) {
if curAcc := s.cfg.Options().URAccepted; to.Options.URAccepted > curAcc {
// UR was enabled
to.Options.URAccepted = usageReportVersion
to.Options.URUniqueID = randomString(8)
to.Options.URUniqueID = util.RandomString(8)
} else if to.Options.URAccepted < curAcc {
// UR was disabled
to.Options.URAccepted = -1