mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-22 14:48:30 +00:00
Rename Model.clusterConfig to Model.generateClusterConfig
This commit is contained in:
parent
0167b4b4a3
commit
9cf653d673
@ -956,7 +956,7 @@ func (m *Model) AddConnection(conn Connection) {
|
||||
|
||||
conn.Start()
|
||||
|
||||
cm := m.clusterConfig(deviceID)
|
||||
cm := m.generateClusterConfig(deviceID)
|
||||
conn.ClusterConfig(cm)
|
||||
|
||||
m.fmut.RLock()
|
||||
@ -1476,8 +1476,9 @@ func (m *Model) numHashers(folder string) int {
|
||||
return 1
|
||||
}
|
||||
|
||||
// clusterConfig returns a ClusterConfigMessage that is correct for the given peer device
|
||||
func (m *Model) clusterConfig(device protocol.DeviceID) protocol.ClusterConfigMessage {
|
||||
// generateClusterConfig returns a ClusterConfigMessage that is correct for
|
||||
// the given peer device
|
||||
func (m *Model) generateClusterConfig(device protocol.DeviceID) protocol.ClusterConfigMessage {
|
||||
cm := protocol.ClusterConfigMessage{
|
||||
DeviceName: m.deviceName,
|
||||
ClientName: m.clientName,
|
||||
|
@ -385,7 +385,7 @@ func TestClusterConfig(t *testing.T) {
|
||||
m.AddFolder(cfg.Folders[1])
|
||||
m.ServeBackground()
|
||||
|
||||
cm := m.clusterConfig(device2)
|
||||
cm := m.generateClusterConfig(device2)
|
||||
|
||||
if l := len(cm.Folders); l != 2 {
|
||||
t.Fatalf("Incorrect number of folders %d != 2", l)
|
||||
|
Loading…
x
Reference in New Issue
Block a user