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

@@ -16,6 +16,7 @@ import (
"github.com/syncthing/syncthing/lib/config"
"github.com/syncthing/syncthing/lib/osutil"
"github.com/syncthing/syncthing/lib/sync"
"github.com/syncthing/syncthing/lib/util"
)
// csrfTokens is a list of valid tokens. It is sorted so that the most
@@ -97,7 +98,7 @@ func validCsrfToken(token string) bool {
}
func newCsrfToken() string {
token := randomString(32)
token := util.RandomString(32)
csrfMut.Lock()
csrfTokens = append([]string{token}, csrfTokens...)