New port number for new format global discovery

This commit is contained in:
Jakob Borg committed 2014-07-13 09:36:22 +02:00
1 parent 864bb8bc34
commit b7cf8a471f
5 files changed
+45 -39

No files matched your search

+7 -1
View File
@@ -144,7 +144,7 @@ type NodeConfiguration struct {
type OptionsConfiguration struct {
ListenAddress []string `xml:"listenAddress" default:"0.0.0.0:22000"`
GlobalAnnServer string `xml:"globalAnnounceServer" default:"announce.syncthing.net:22025"`
GlobalAnnServer string `xml:"globalAnnounceServer" default:"announce.syncthing.net:22026"`
GlobalAnnEnabled bool `xml:"globalAnnounceEnabled" default:"true"`
LocalAnnEnabled bool `xml:"localAnnounceEnabled" default:"true"`
LocalAnnPort int `xml:"localAnnouncePort" default:"21025"`
@@ -362,6 +362,12 @@ func Load(rd io.Reader, myID protocol.NodeID) (Configuration, error) {
}
}
// The global discovery format and port number changed in v0.9. Having the
// default announce server but old port number is guaranteed to be legacy.
if cfg.Options.GlobalAnnServer == "announce.syncthing.net:22025" {
cfg.Options.GlobalAnnServer = "announce.syncthing.net:22026"
}
return cfg, err
}