Remove pointless CompareClusterConfig

This commit is contained in:
Jakob Borg 2014-07-31 14:17:46 +02:00
parent e9e45d0e29
commit 830be1035b
3 changed files with 510 additions and 51 deletions

View File

@ -396,17 +396,6 @@ func (m *Model) repoSharedWith(repo string, nodeID protocol.NodeID) bool {
}
func (m *Model) ClusterConfig(nodeID protocol.NodeID, config protocol.ClusterConfigMessage) {
compErr := compareClusterConfig(m.clusterConfig(nodeID), config)
if debug {
l.Debugf("ClusterConfig: %s: %#v", nodeID, config)
l.Debugf(" ... compare: %s: %v", nodeID, compErr)
}
if compErr != nil {
l.Warnf("%s: %v", nodeID, compErr)
m.Close(nodeID, compErr)
}
m.pmut.Lock()
if config.ClientName == "syncthing" {
m.nodeVer[nodeID] = config.ClientVersion

510
model/profile Normal file
View File

@ -0,0 +1,510 @@
mode: set
github.com/syncthing/syncthing/model/tempname.go:21.50,23.2 1 1
github.com/syncthing/syncthing/model/tempname.go:25.49,29.2 3 0
github.com/syncthing/syncthing/model/util.go:12.61,13.12 1 1
github.com/syncthing/syncthing/model/util.go:13.12,14.7 1 1
github.com/syncthing/syncthing/model/util.go:14.7,18.14 3 1
github.com/syncthing/syncthing/model/util.go:24.4,24.14 1 0
github.com/syncthing/syncthing/model/util.go:29.4,29.21 1 0
github.com/syncthing/syncthing/model/util.go:18.14,22.5 3 0
github.com/syncthing/syncthing/model/util.go:24.14,27.5 2 0
github.com/syncthing/syncthing/model/util.go:29.21,31.5 1 0
github.com/syncthing/syncthing/model/blockqueue.go:27.35,29.29 1 0
github.com/syncthing/syncthing/model/blockqueue.go:35.2,37.21 2 0
github.com/syncthing/syncthing/model/blockqueue.go:48.2,48.27 1 0
github.com/syncthing/syncthing/model/blockqueue.go:57.2,57.34 1 0
github.com/syncthing/syncthing/model/blockqueue.go:29.29,30.33 1 0
github.com/syncthing/syncthing/model/blockqueue.go:30.33,32.4 1 0
github.com/syncthing/syncthing/model/blockqueue.go:37.21,45.3 1 0
github.com/syncthing/syncthing/model/blockqueue.go:48.27,55.3 1 0
github.com/syncthing/syncthing/model/blockqueue.go:57.34,63.3 1 0
github.com/syncthing/syncthing/model/blockqueue.go:66.44,67.24 1 0
github.com/syncthing/syncthing/model/blockqueue.go:70.2,72.16 3 0
github.com/syncthing/syncthing/model/blockqueue.go:67.24,69.3 1 0
github.com/syncthing/syncthing/model/model.go:36.36,37.11 1 1
github.com/syncthing/syncthing/model/model.go:38.2,39.16 1 1
github.com/syncthing/syncthing/model/model.go:40.2,41.20 1 1
github.com/syncthing/syncthing/model/model.go:42.2,43.20 1 0
github.com/syncthing/syncthing/model/model.go:44.2,45.19 1 0
github.com/syncthing/syncthing/model/model.go:46.2,47.19 1 0
github.com/syncthing/syncthing/model/model.go:101.116,123.53 3 1
github.com/syncthing/syncthing/model/model.go:129.2,132.10 4 1
github.com/syncthing/syncthing/model/model.go:123.53,125.17 2 0
github.com/syncthing/syncthing/model/model.go:125.17,127.4 1 0
github.com/syncthing/syncthing/model/model.go:138.55,142.38 3 0
github.com/syncthing/syncthing/model/model.go:142.38,144.3 1 0
github.com/syncthing/syncthing/model/model.go:144.4,146.3 1 0
github.com/syncthing/syncthing/model/model.go:152.42,154.2 1 0
github.com/syncthing/syncthing/model/model.go:163.61,172.38 5 0
github.com/syncthing/syncthing/model/model.go:184.2,196.12 5 0
github.com/syncthing/syncthing/model/model.go:172.38,177.51 2 0
github.com/syncthing/syncthing/model/model.go:181.3,181.26 1 0
github.com/syncthing/syncthing/model/model.go:177.51,179.4 1 0
github.com/syncthing/syncthing/model/model.go:200.71,202.62 2 0
github.com/syncthing/syncthing/model/model.go:215.2,216.66 2 0
github.com/syncthing/syncthing/model/model.go:229.2,229.47 1 0
github.com/syncthing/syncthing/model/model.go:202.62,203.35 1 0
github.com/syncthing/syncthing/model/model.go:212.3,212.14 1 0
github.com/syncthing/syncthing/model/model.go:203.35,205.37 2 0
github.com/syncthing/syncthing/model/model.go:210.4,210.15 1 0
github.com/syncthing/syncthing/model/model.go:205.37,207.5 1 0
github.com/syncthing/syncthing/model/model.go:207.6,209.5 1 0
github.com/syncthing/syncthing/model/model.go:216.66,217.35 1 0
github.com/syncthing/syncthing/model/model.go:226.3,226.14 1 0
github.com/syncthing/syncthing/model/model.go:217.35,219.37 2 0
github.com/syncthing/syncthing/model/model.go:224.4,224.16 1 0
github.com/syncthing/syncthing/model/model.go:219.37,221.5 1 0
github.com/syncthing/syncthing/model/model.go:221.6,223.5 1 0
github.com/syncthing/syncthing/model/model.go:232.71,233.23 1 0
github.com/syncthing/syncthing/model/model.go:239.2,239.8 1 0
github.com/syncthing/syncthing/model/model.go:233.23,238.3 4 0
github.com/syncthing/syncthing/model/model.go:242.72,243.34 1 0
github.com/syncthing/syncthing/model/model.go:254.2,254.8 1 0
github.com/syncthing/syncthing/model/model.go:243.34,245.37 2 0
github.com/syncthing/syncthing/model/model.go:245.37,247.4 1 0
github.com/syncthing/syncthing/model/model.go:247.5,249.4 1 0
github.com/syncthing/syncthing/model/model.go:250.4,253.3 2 0
github.com/syncthing/syncthing/model/model.go:259.75,262.37 3 0
github.com/syncthing/syncthing/model/model.go:271.2,271.8 1 0
github.com/syncthing/syncthing/model/model.go:262.37,263.48 1 0
github.com/syncthing/syncthing/model/model.go:263.48,269.4 5 0
github.com/syncthing/syncthing/model/model.go:276.74,279.37 3 0
github.com/syncthing/syncthing/model/model.go:288.2,288.8 1 0
github.com/syncthing/syncthing/model/model.go:279.37,280.68 1 0
github.com/syncthing/syncthing/model/model.go:280.68,286.4 5 0
github.com/syncthing/syncthing/model/model.go:292.64,295.37 3 0
github.com/syncthing/syncthing/model/model.go:303.2,303.8 1 0
github.com/syncthing/syncthing/model/model.go:295.37,296.68 1 0
github.com/syncthing/syncthing/model/model.go:296.68,301.4 4 0
github.com/syncthing/syncthing/model/model.go:307.64,310.37 3 0
github.com/syncthing/syncthing/model/model.go:318.2,318.12 1 0
github.com/syncthing/syncthing/model/model.go:310.37,312.68 2 0
github.com/syncthing/syncthing/model/model.go:316.3,316.12 1 0
github.com/syncthing/syncthing/model/model.go:312.68,315.4 2 0
github.com/syncthing/syncthing/model/model.go:323.84,324.11 1 0
github.com/syncthing/syncthing/model/model.go:328.2,328.37 1 0
github.com/syncthing/syncthing/model/model.go:333.2,333.20 1 0
github.com/syncthing/syncthing/model/model.go:337.2,340.8 4 0
github.com/syncthing/syncthing/model/model.go:346.2,351.4 1 0
github.com/syncthing/syncthing/model/model.go:324.11,326.3 1 0
github.com/syncthing/syncthing/model/model.go:328.37,331.3 2 0
github.com/syncthing/syncthing/model/model.go:333.20,335.3 1 0
github.com/syncthing/syncthing/model/model.go:340.8,342.3 1 0
github.com/syncthing/syncthing/model/model.go:342.4,344.3 1 0
github.com/syncthing/syncthing/model/model.go:356.90,357.11 1 0
github.com/syncthing/syncthing/model/model.go:361.2,361.37 1 0
github.com/syncthing/syncthing/model/model.go:366.2,366.20 1 0
github.com/syncthing/syncthing/model/model.go:370.2,373.8 4 0
github.com/syncthing/syncthing/model/model.go:379.2,384.4 1 0
github.com/syncthing/syncthing/model/model.go:357.11,359.3 1 0
github.com/syncthing/syncthing/model/model.go:361.37,364.3 2 0
github.com/syncthing/syncthing/model/model.go:366.20,368.3 1 0
github.com/syncthing/syncthing/model/model.go:373.8,375.3 1 0
github.com/syncthing/syncthing/model/model.go:375.4,377.3 1 0
github.com/syncthing/syncthing/model/model.go:387.74,390.44 3 0
github.com/syncthing/syncthing/model/model.go:395.2,395.14 1 0
github.com/syncthing/syncthing/model/model.go:390.44,391.20 1 0
github.com/syncthing/syncthing/model/model.go:391.20,393.4 1 0
github.com/syncthing/syncthing/model/model.go:398.93,400.38 2 0
github.com/syncthing/syncthing/model/model.go:405.2,407.87 2 0
github.com/syncthing/syncthing/model/model.go:400.38,402.3 1 0
github.com/syncthing/syncthing/model/model.go:402.4,404.3 1 0
github.com/syncthing/syncthing/model/model.go:412.56,421.41 5 0
github.com/syncthing/syncthing/model/model.go:424.2,427.8 3 0
github.com/syncthing/syncthing/model/model.go:430.2,433.17 4 0
github.com/syncthing/syncthing/model/model.go:421.41,423.3 1 0
github.com/syncthing/syncthing/model/model.go:427.8,429.3 1 0
github.com/syncthing/syncthing/model/model.go:438.108,444.9 4 1
github.com/syncthing/syncthing/model/model.go:449.2,450.66 2 1
github.com/syncthing/syncthing/model/model.go:457.2,457.24 1 1
github.com/syncthing/syncthing/model/model.go:464.2,464.45 1 1
github.com/syncthing/syncthing/model/model.go:467.2,471.16 5 1
github.com/syncthing/syncthing/model/model.go:474.2,478.16 4 1
github.com/syncthing/syncthing/model/model.go:482.2,482.17 1 1
github.com/syncthing/syncthing/model/model.go:444.9,447.3 2 0
github.com/syncthing/syncthing/model/model.go:450.66,451.12 1 0
github.com/syncthing/syncthing/model/model.go:454.3,454.25 1 0
github.com/syncthing/syncthing/model/model.go:451.12,453.4 1 0
github.com/syncthing/syncthing/model/model.go:457.24,458.12 1 0
github.com/syncthing/syncthing/model/model.go:461.3,461.28 1 0
github.com/syncthing/syncthing/model/model.go:458.12,460.4 1 0
github.com/syncthing/syncthing/model/model.go:464.45,466.3 1 0
github.com/syncthing/syncthing/model/model.go:471.16,473.3 1 1
github.com/syncthing/syncthing/model/model.go:478.16,480.3 1 0
github.com/syncthing/syncthing/model/model.go:486.67,490.2 3 0
github.com/syncthing/syncthing/model/model.go:492.77,497.2 4 1
github.com/syncthing/syncthing/model/model.go:499.79,504.2 4 0
github.com/syncthing/syncthing/model/model.go:512.61,514.2 1 1
github.com/syncthing/syncthing/model/model.go:517.58,522.2 4 0
github.com/syncthing/syncthing/model/model.go:527.81,531.38 3 0
github.com/syncthing/syncthing/model/model.go:534.2,535.36 2 0
github.com/syncthing/syncthing/model/model.go:538.2,544.43 5 0
github.com/syncthing/syncthing/model/model.go:548.2,549.17 2 0
github.com/syncthing/syncthing/model/model.go:531.38,533.3 1 0
github.com/syncthing/syncthing/model/model.go:535.36,537.3 1 0
github.com/syncthing/syncthing/model/model.go:544.43,547.3 2 0
github.com/syncthing/syncthing/model/model.go:552.72,557.11 4 0
github.com/syncthing/syncthing/model/model.go:561.2,561.15 1 0
github.com/syncthing/syncthing/model/model.go:567.2,569.17 2 0
github.com/syncthing/syncthing/model/model.go:557.11,559.3 1 0
github.com/syncthing/syncthing/model/model.go:561.15,562.12 1 0
github.com/syncthing/syncthing/model/model.go:562.12,564.4 1 0
github.com/syncthing/syncthing/model/model.go:569.17,571.59 2 0
github.com/syncthing/syncthing/model/model.go:575.3,575.69 1 0
github.com/syncthing/syncthing/model/model.go:571.59,572.12 1 0
github.com/syncthing/syncthing/model/model.go:579.122,586.67 6 0
github.com/syncthing/syncthing/model/model.go:620.2,620.27 1 0
github.com/syncthing/syncthing/model/model.go:632.2,632.25 1 0
github.com/syncthing/syncthing/model/model.go:586.67,587.36 1 0
github.com/syncthing/syncthing/model/model.go:591.3,591.35 1 0
github.com/syncthing/syncthing/model/model.go:595.3,595.35 1 0
github.com/syncthing/syncthing/model/model.go:616.3,617.14 2 0
github.com/syncthing/syncthing/model/model.go:587.36,589.4 1 0
github.com/syncthing/syncthing/model/model.go:591.35,593.4 1 0
github.com/syncthing/syncthing/model/model.go:595.35,596.15 1 0
github.com/syncthing/syncthing/model/model.go:613.4,613.56 1 0
github.com/syncthing/syncthing/model/model.go:596.15,597.50 1 0
github.com/syncthing/syncthing/model/model.go:600.5,600.14 1 0
github.com/syncthing/syncthing/model/model.go:603.5,603.20 1 0
github.com/syncthing/syncthing/model/model.go:597.50,599.6 1 0
github.com/syncthing/syncthing/model/model.go:600.14,602.6 1 0
github.com/syncthing/syncthing/model/model.go:604.6,605.56 1 0
github.com/syncthing/syncthing/model/model.go:608.5,608.14 1 0
github.com/syncthing/syncthing/model/model.go:605.56,607.6 1 0
github.com/syncthing/syncthing/model/model.go:608.14,610.6 1 0
github.com/syncthing/syncthing/model/model.go:620.27,622.26 2 0
github.com/syncthing/syncthing/model/model.go:622.26,624.4 1 0
github.com/syncthing/syncthing/model/model.go:625.4,625.41 1 0
github.com/syncthing/syncthing/model/model.go:625.41,627.26 2 0
github.com/syncthing/syncthing/model/model.go:627.26,629.4 1 0
github.com/syncthing/syncthing/model/model.go:635.63,647.2 5 0
github.com/syncthing/syncthing/model/model.go:649.127,654.9 4 0
github.com/syncthing/syncthing/model/model.go:658.2,658.11 1 0
github.com/syncthing/syncthing/model/model.go:662.2,662.45 1 0
github.com/syncthing/syncthing/model/model.go:654.9,656.3 1 0
github.com/syncthing/syncthing/model/model.go:658.11,660.3 1 0
github.com/syncthing/syncthing/model/model.go:665.61,666.15 1 1
github.com/syncthing/syncthing/model/model.go:669.2,669.22 1 1
github.com/syncthing/syncthing/model/model.go:673.2,679.33 6 1
github.com/syncthing/syncthing/model/model.go:684.2,685.17 2 1
github.com/syncthing/syncthing/model/model.go:666.15,668.3 1 0
github.com/syncthing/syncthing/model/model.go:669.22,671.3 1 0
github.com/syncthing/syncthing/model/model.go:679.33,682.3 2 0
github.com/syncthing/syncthing/model/model.go:688.29,691.31 3 0
github.com/syncthing/syncthing/model/model.go:694.2,698.29 4 0
github.com/syncthing/syncthing/model/model.go:708.2,708.11 1 0
github.com/syncthing/syncthing/model/model.go:691.31,693.3 1 0
github.com/syncthing/syncthing/model/model.go:698.29,700.13 2 0
github.com/syncthing/syncthing/model/model.go:700.13,702.18 2 0
github.com/syncthing/syncthing/model/model.go:705.4,705.13 1 0
github.com/syncthing/syncthing/model/model.go:702.18,704.5 1 0
github.com/syncthing/syncthing/model/model.go:711.30,714.33 3 0
github.com/syncthing/syncthing/model/model.go:717.2,721.27 4 0
github.com/syncthing/syncthing/model/model.go:731.2,731.11 1 0
github.com/syncthing/syncthing/model/model.go:714.33,716.3 1 0
github.com/syncthing/syncthing/model/model.go:721.27,726.13 2 0
github.com/syncthing/syncthing/model/model.go:726.13,729.4 2 0
github.com/syncthing/syncthing/model/model.go:734.45,753.16 8 1
github.com/syncthing/syncthing/model/model.go:756.2,758.23 3 1
github.com/syncthing/syncthing/model/model.go:772.2,772.20 1 1
github.com/syncthing/syncthing/model/model.go:776.2,777.67 2 1
github.com/syncthing/syncthing/model/model.go:801.2,801.20 1 1
github.com/syncthing/syncthing/model/model.go:805.2,806.12 2 1
github.com/syncthing/syncthing/model/model.go:753.16,755.3 1 0
github.com/syncthing/syncthing/model/model.go:758.23,766.30 2 1
github.com/syncthing/syncthing/model/model.go:770.3,770.27 1 1
github.com/syncthing/syncthing/model/model.go:766.30,769.4 2 0
github.com/syncthing/syncthing/model/model.go:772.20,774.3 1 1
github.com/syncthing/syncthing/model/model.go:777.67,778.35 1 1
github.com/syncthing/syncthing/model/model.go:799.3,799.14 1 1
github.com/syncthing/syncthing/model/model.go:778.35,779.31 1 1
github.com/syncthing/syncthing/model/model.go:783.4,783.87 1 1
github.com/syncthing/syncthing/model/model.go:779.31,782.5 2 0
github.com/syncthing/syncthing/model/model.go:783.87,797.5 6 0
github.com/syncthing/syncthing/model/model.go:801.20,803.3 1 0
github.com/syncthing/syncthing/model/model.go:810.83,817.41 3 0
github.com/syncthing/syncthing/model/model.go:830.2,832.11 2 0
github.com/syncthing/syncthing/model/model.go:817.41,821.42 2 0
github.com/syncthing/syncthing/model/model.go:828.3,828.48 1 0
github.com/syncthing/syncthing/model/model.go:821.42,827.4 1 0
github.com/syncthing/syncthing/model/model.go:835.56,839.23 4 1
github.com/syncthing/syncthing/model/model.go:852.2,852.17 1 1
github.com/syncthing/syncthing/model/model.go:839.23,846.9 4 1
github.com/syncthing/syncthing/model/model.go:850.3,850.53 1 1
github.com/syncthing/syncthing/model/model.go:846.9,849.4 2 1
github.com/syncthing/syncthing/model/model.go:855.56,861.2 5 0
github.com/syncthing/syncthing/model/model.go:863.39,869.70 5 0
github.com/syncthing/syncthing/model/model.go:889.2,889.20 1 0
github.com/syncthing/syncthing/model/model.go:869.70,870.35 1 0
github.com/syncthing/syncthing/model/model.go:875.3,876.29 2 0
github.com/syncthing/syncthing/model/model.go:884.3,887.14 4 0
github.com/syncthing/syncthing/model/model.go:870.35,873.4 2 0
github.com/syncthing/syncthing/model/model.go:876.29,880.4 2 0
github.com/syncthing/syncthing/model/model.go:880.5,883.4 1 0
github.com/syncthing/syncthing/model/model.go:889.20,891.3 1 0
github.com/syncthing/syncthing/model/model.go:897.50,902.9 4 0
github.com/syncthing/syncthing/model/model.go:906.2,907.38 2 0
github.com/syncthing/syncthing/model/model.go:911.2,911.12 1 0
github.com/syncthing/syncthing/model/model.go:902.9,904.3 1 0
github.com/syncthing/syncthing/model/model.go:907.38,909.3 1 0
github.com/syncthing/syncthing/model/puller.go:43.120,46.36 3 1
github.com/syncthing/syncthing/model/puller.go:53.2,54.17 2 1
github.com/syncthing/syncthing/model/puller.go:46.36,48.35 2 1
github.com/syncthing/syncthing/model/puller.go:48.35,51.4 2 1
github.com/syncthing/syncthing/model/puller.go:57.53,59.2 1 0
github.com/syncthing/syncthing/model/puller.go:77.116,90.38 2 0
github.com/syncthing/syncthing/model/puller.go:98.2,98.15 1 0
github.com/syncthing/syncthing/model/puller.go:111.2,111.10 1 0
github.com/syncthing/syncthing/model/puller.go:90.38,92.10 2 0
github.com/syncthing/syncthing/model/puller.go:95.3,95.51 1 0
github.com/syncthing/syncthing/model/puller.go:92.10,94.4 1 0
github.com/syncthing/syncthing/model/puller.go:98.15,100.12 1 0
github.com/syncthing/syncthing/model/puller.go:103.3,103.13 1 0
github.com/syncthing/syncthing/model/puller.go:100.12,102.4 1 0
github.com/syncthing/syncthing/model/puller.go:104.4,106.12 1 0
github.com/syncthing/syncthing/model/puller.go:109.3,109.15 1 0
github.com/syncthing/syncthing/model/puller.go:106.12,108.4 1 0
github.com/syncthing/syncthing/model/puller.go:114.24,122.43 6 0
github.com/syncthing/syncthing/model/puller.go:126.2,126.6 1 0
github.com/syncthing/syncthing/model/puller.go:122.43,124.3 1 0
github.com/syncthing/syncthing/model/puller.go:126.6,130.17 2 0
github.com/syncthing/syncthing/model/puller.go:184.3,184.14 1 0
github.com/syncthing/syncthing/model/puller.go:190.3,193.38 2 0
github.com/syncthing/syncthing/model/puller.go:206.3,206.30 1 0
github.com/syncthing/syncthing/model/puller.go:130.17,133.8 1 0
github.com/syncthing/syncthing/model/puller.go:133.8,134.12 1 0
github.com/syncthing/syncthing/model/puller.go:135.5,139.32 4 0
github.com/syncthing/syncthing/model/puller.go:141.5,144.13 2 0
github.com/syncthing/syncthing/model/puller.go:152.6,152.38 1 0
github.com/syncthing/syncthing/model/puller.go:160.6,160.13 1 0
github.com/syncthing/syncthing/model/puller.go:171.6,171.15 1 0
github.com/syncthing/syncthing/model/puller.go:174.6,176.26 3 0
github.com/syncthing/syncthing/model/puller.go:144.13,145.16 1 0
github.com/syncthing/syncthing/model/puller.go:148.7,149.25 2 0
github.com/syncthing/syncthing/model/puller.go:145.16,147.8 1 0
github.com/syncthing/syncthing/model/puller.go:152.38,154.16 1 0
github.com/syncthing/syncthing/model/puller.go:157.7,157.17 1 0
github.com/syncthing/syncthing/model/puller.go:154.16,156.8 1 0
github.com/syncthing/syncthing/model/puller.go:160.13,163.16 1 0
github.com/syncthing/syncthing/model/puller.go:166.7,168.20 3 0
github.com/syncthing/syncthing/model/puller.go:163.16,165.8 1 0
github.com/syncthing/syncthing/model/puller.go:171.15,173.7 1 0
github.com/syncthing/syncthing/model/puller.go:176.26,179.7 1 0
github.com/syncthing/syncthing/model/puller.go:184.14,188.4 3 0
github.com/syncthing/syncthing/model/puller.go:193.38,194.13 1 0
github.com/syncthing/syncthing/model/puller.go:198.4,199.18 2 0
github.com/syncthing/syncthing/model/puller.go:203.4,203.25 1 0
github.com/syncthing/syncthing/model/puller.go:194.13,196.5 1 0
github.com/syncthing/syncthing/model/puller.go:199.18,202.5 2 0
github.com/syncthing/syncthing/model/puller.go:210.26,213.27 2 0
github.com/syncthing/syncthing/model/puller.go:213.27,214.12 1 0
github.com/syncthing/syncthing/model/puller.go:217.3,218.17 2 0
github.com/syncthing/syncthing/model/puller.go:214.12,216.4 1 0
github.com/syncthing/syncthing/model/puller.go:218.17,221.4 2 0
github.com/syncthing/syncthing/model/puller.go:225.37,229.68 3 0
github.com/syncthing/syncthing/model/puller.go:288.2,288.6 1 0
github.com/syncthing/syncthing/model/puller.go:229.68,230.17 1 0
github.com/syncthing/syncthing/model/puller.go:234.3,234.20 1 0
github.com/syncthing/syncthing/model/puller.go:238.3,239.17 2 0
github.com/syncthing/syncthing/model/puller.go:243.3,243.16 1 0
github.com/syncthing/syncthing/model/puller.go:247.3,247.41 1 0
github.com/syncthing/syncthing/model/puller.go:251.3,252.21 2 0
github.com/syncthing/syncthing/model/puller.go:260.3,260.36 1 0
github.com/syncthing/syncthing/model/puller.go:273.3,273.125 1 0
github.com/syncthing/syncthing/model/puller.go:285.3,285.13 1 0
github.com/syncthing/syncthing/model/puller.go:230.17,232.4 1 0
github.com/syncthing/syncthing/model/puller.go:234.20,236.4 1 0
github.com/syncthing/syncthing/model/puller.go:239.17,241.4 1 0
github.com/syncthing/syncthing/model/puller.go:243.16,245.4 1 0
github.com/syncthing/syncthing/model/puller.go:247.41,249.4 1 0
github.com/syncthing/syncthing/model/puller.go:252.21,254.13 1 0
github.com/syncthing/syncthing/model/puller.go:257.4,257.14 1 0
github.com/syncthing/syncthing/model/puller.go:254.13,256.5 1 0
github.com/syncthing/syncthing/model/puller.go:260.36,261.13 1 0
github.com/syncthing/syncthing/model/puller.go:269.4,270.14 2 0
github.com/syncthing/syncthing/model/puller.go:261.13,263.5 1 0
github.com/syncthing/syncthing/model/puller.go:273.125,275.18 2 0
github.com/syncthing/syncthing/model/puller.go:275.18,277.5 1 0
github.com/syncthing/syncthing/model/puller.go:277.6,279.14 2 0
github.com/syncthing/syncthing/model/puller.go:279.14,281.6 1 0
github.com/syncthing/syncthing/model/puller.go:288.6,295.45 5 0
github.com/syncthing/syncthing/model/puller.go:308.3,308.12 1 0
github.com/syncthing/syncthing/model/puller.go:312.3,312.27 1 0
github.com/syncthing/syncthing/model/puller.go:295.45,297.13 2 0
github.com/syncthing/syncthing/model/puller.go:300.4,301.18 2 0
github.com/syncthing/syncthing/model/puller.go:297.13,299.5 1 0
github.com/syncthing/syncthing/model/puller.go:301.18,303.5 1 0
github.com/syncthing/syncthing/model/puller.go:303.6,305.5 1 0
github.com/syncthing/syncthing/model/puller.go:308.12,310.4 1 0
github.com/syncthing/syncthing/model/puller.go:312.27,314.4 1 0
github.com/syncthing/syncthing/model/puller.go:318.57,323.9 4 0
github.com/syncthing/syncthing/model/puller.go:328.2,328.20 1 0
github.com/syncthing/syncthing/model/puller.go:342.2,345.36 3 0
github.com/syncthing/syncthing/model/puller.go:323.9,326.3 1 0
github.com/syncthing/syncthing/model/puller.go:328.20,331.12 2 0
github.com/syncthing/syncthing/model/puller.go:331.12,333.4 1 0
github.com/syncthing/syncthing/model/puller.go:334.4,334.26 1 0
github.com/syncthing/syncthing/model/puller.go:334.26,337.12 2 0
github.com/syncthing/syncthing/model/puller.go:337.12,339.4 1 0
github.com/syncthing/syncthing/model/puller.go:345.36,347.3 1 0
github.com/syncthing/syncthing/model/puller.go:353.46,358.35 2 0
github.com/syncthing/syncthing/model/puller.go:378.2,378.68 1 0
github.com/syncthing/syncthing/model/puller.go:406.2,409.9 3 0
github.com/syncthing/syncthing/model/puller.go:445.2,445.19 1 0
github.com/syncthing/syncthing/model/puller.go:457.2,459.9 2 0
github.com/syncthing/syncthing/model/puller.go:358.35,359.35 1 0
github.com/syncthing/syncthing/model/puller.go:374.3,375.14 2 0
github.com/syncthing/syncthing/model/puller.go:359.35,362.40 3 0
github.com/syncthing/syncthing/model/puller.go:362.40,363.14 1 0
github.com/syncthing/syncthing/model/puller.go:366.5,367.19 2 0
github.com/syncthing/syncthing/model/puller.go:363.14,365.6 1 0
github.com/syncthing/syncthing/model/puller.go:367.19,369.6 1 0
github.com/syncthing/syncthing/model/puller.go:371.5,371.19 1 0
github.com/syncthing/syncthing/model/puller.go:371.19,373.4 1 0
github.com/syncthing/syncthing/model/puller.go:378.68,381.12 1 0
github.com/syncthing/syncthing/model/puller.go:384.3,387.26 4 0
github.com/syncthing/syncthing/model/puller.go:390.3,390.68 1 0
github.com/syncthing/syncthing/model/puller.go:397.3,403.14 3 0
github.com/syncthing/syncthing/model/puller.go:381.12,383.4 1 0
github.com/syncthing/syncthing/model/puller.go:387.26,389.4 1 0
github.com/syncthing/syncthing/model/puller.go:390.68,392.27 2 0
github.com/syncthing/syncthing/model/puller.go:392.27,394.5 1 0
github.com/syncthing/syncthing/model/puller.go:409.9,410.12 1 0
github.com/syncthing/syncthing/model/puller.go:414.3,425.17 7 0
github.com/syncthing/syncthing/model/puller.go:428.3,428.17 1 0
github.com/syncthing/syncthing/model/puller.go:432.3,433.20 2 0
github.com/syncthing/syncthing/model/puller.go:442.3,442.27 1 0
github.com/syncthing/syncthing/model/puller.go:410.12,412.4 1 0
github.com/syncthing/syncthing/model/puller.go:425.17,427.4 1 0
github.com/syncthing/syncthing/model/puller.go:428.17,430.4 1 0
github.com/syncthing/syncthing/model/puller.go:433.20,434.13 1 0
github.com/syncthing/syncthing/model/puller.go:437.4,437.15 1 0
github.com/syncthing/syncthing/model/puller.go:440.4,440.15 1 0
github.com/syncthing/syncthing/model/puller.go:434.13,436.5 1 0
github.com/syncthing/syncthing/model/puller.go:437.15,439.5 1 0
github.com/syncthing/syncthing/model/puller.go:445.19,447.12 1 0
github.com/syncthing/syncthing/model/puller.go:450.3,450.13 1 0
github.com/syncthing/syncthing/model/puller.go:454.3,454.14 1 0
github.com/syncthing/syncthing/model/puller.go:447.12,449.4 1 0
github.com/syncthing/syncthing/model/puller.go:450.13,452.4 1 0
github.com/syncthing/syncthing/model/puller.go:460.2,462.14 2 0
github.com/syncthing/syncthing/model/puller.go:464.2,465.33 1 0
github.com/syncthing/syncthing/model/puller.go:467.2,469.14 2 0
github.com/syncthing/syncthing/model/puller.go:473.45,478.11 3 0
github.com/syncthing/syncthing/model/puller.go:482.2,484.19 3 0
github.com/syncthing/syncthing/model/puller.go:494.2,496.27 2 0
github.com/syncthing/syncthing/model/puller.go:478.11,480.3 1 0
github.com/syncthing/syncthing/model/puller.go:484.19,485.12 1 0
github.com/syncthing/syncthing/model/puller.go:488.3,492.9 4 0
github.com/syncthing/syncthing/model/puller.go:485.12,487.4 1 0
github.com/syncthing/syncthing/model/puller.go:496.27,499.20 3 0
github.com/syncthing/syncthing/model/puller.go:502.3,502.20 1 0
github.com/syncthing/syncthing/model/puller.go:499.20,501.4 1 0
github.com/syncthing/syncthing/model/puller.go:502.20,503.13 1 0
github.com/syncthing/syncthing/model/puller.go:506.4,511.10 5 0
github.com/syncthing/syncthing/model/puller.go:503.13,505.5 1 0
github.com/syncthing/syncthing/model/puller.go:519.53,522.9 3 0
github.com/syncthing/syncthing/model/puller.go:526.2,527.33 2 0
github.com/syncthing/syncthing/model/puller.go:551.2,554.43 3 0
github.com/syncthing/syncthing/model/puller.go:570.2,570.14 1 0
github.com/syncthing/syncthing/model/puller.go:522.9,524.3 1 0
github.com/syncthing/syncthing/model/puller.go:527.33,529.21 2 0
github.com/syncthing/syncthing/model/puller.go:537.3,537.13 1 0
github.com/syncthing/syncthing/model/puller.go:548.3,548.14 1 0
github.com/syncthing/syncthing/model/puller.go:529.21,533.13 4 0
github.com/syncthing/syncthing/model/puller.go:533.13,535.5 1 0
github.com/syncthing/syncthing/model/puller.go:537.13,538.13 1 0
github.com/syncthing/syncthing/model/puller.go:541.4,541.31 1 0
github.com/syncthing/syncthing/model/puller.go:538.13,540.5 1 0
github.com/syncthing/syncthing/model/puller.go:542.5,543.13 1 0
github.com/syncthing/syncthing/model/puller.go:546.4,546.28 1 0
github.com/syncthing/syncthing/model/puller.go:543.13,545.5 1 0
github.com/syncthing/syncthing/model/puller.go:554.43,555.12 1 0
github.com/syncthing/syncthing/model/puller.go:559.3,567.4 2 0
github.com/syncthing/syncthing/model/puller.go:555.12,557.4 1 0
github.com/syncthing/syncthing/model/puller.go:573.46,577.12 3 0
github.com/syncthing/syncthing/model/puller.go:583.2,583.33 1 0
github.com/syncthing/syncthing/model/puller.go:619.2,619.29 1 0
github.com/syncthing/syncthing/model/puller.go:577.12,578.20 1 0
github.com/syncthing/syncthing/model/puller.go:578.20,580.4 1 0
github.com/syncthing/syncthing/model/puller.go:583.33,584.12 1 0
github.com/syncthing/syncthing/model/puller.go:587.3,589.25 3 0
github.com/syncthing/syncthing/model/puller.go:584.12,586.4 1 0
github.com/syncthing/syncthing/model/puller.go:589.25,590.13 1 0
github.com/syncthing/syncthing/model/puller.go:593.4,593.80 1 0
github.com/syncthing/syncthing/model/puller.go:590.13,592.5 1 0
github.com/syncthing/syncthing/model/puller.go:593.80,595.5 1 0
github.com/syncthing/syncthing/model/puller.go:595.6,595.20 1 0
github.com/syncthing/syncthing/model/puller.go:595.20,597.5 1 0
github.com/syncthing/syncthing/model/puller.go:598.5,598.77 1 0
github.com/syncthing/syncthing/model/puller.go:598.77,600.4 1 0
github.com/syncthing/syncthing/model/puller.go:601.4,602.12 1 0
github.com/syncthing/syncthing/model/puller.go:605.3,606.39 2 0
github.com/syncthing/syncthing/model/puller.go:610.3,610.123 1 0
github.com/syncthing/syncthing/model/puller.go:614.3,615.49 2 0
github.com/syncthing/syncthing/model/puller.go:602.12,604.4 1 0
github.com/syncthing/syncthing/model/puller.go:606.39,609.4 2 0
github.com/syncthing/syncthing/model/puller.go:610.123,613.4 2 0
github.com/syncthing/syncthing/model/puller.go:615.49,617.4 1 0
github.com/syncthing/syncthing/model/puller.go:622.66,624.23 2 0
github.com/syncthing/syncthing/model/puller.go:628.2,628.11 1 0
github.com/syncthing/syncthing/model/puller.go:632.2,633.56 2 0
github.com/syncthing/syncthing/model/puller.go:649.2,649.25 1 0
github.com/syncthing/syncthing/model/puller.go:653.2,653.16 1 0
github.com/syncthing/syncthing/model/puller.go:624.23,626.3 1 0
github.com/syncthing/syncthing/model/puller.go:628.11,630.3 1 0
github.com/syncthing/syncthing/model/puller.go:633.56,634.39 1 0
github.com/syncthing/syncthing/model/puller.go:637.3,639.12 3 0
github.com/syncthing/syncthing/model/puller.go:642.3,647.5 2 0
github.com/syncthing/syncthing/model/puller.go:634.39,635.12 1 0
github.com/syncthing/syncthing/model/puller.go:639.12,641.4 1 0
github.com/syncthing/syncthing/model/puller.go:649.25,651.3 1 0
github.com/syncthing/syncthing/model/puller.go:653.16,655.3 1 0
github.com/syncthing/syncthing/model/puller.go:655.4,657.3 1 0
github.com/syncthing/syncthing/model/puller.go:660.49,661.11 1 0
github.com/syncthing/syncthing/model/puller.go:665.2,672.16 6 0
github.com/syncthing/syncthing/model/puller.go:678.2,681.48 3 0
github.com/syncthing/syncthing/model/puller.go:688.2,688.20 1 0
github.com/syncthing/syncthing/model/puller.go:695.2,697.25 3 0
github.com/syncthing/syncthing/model/puller.go:700.2,700.67 1 0
github.com/syncthing/syncthing/model/puller.go:707.2,709.24 2 0
github.com/syncthing/syncthing/model/puller.go:719.2,719.11 1 0
github.com/syncthing/syncthing/model/puller.go:722.2,722.60 1 0
github.com/syncthing/syncthing/model/puller.go:661.11,663.3 1 0
github.com/syncthing/syncthing/model/puller.go:672.16,673.12 1 0
github.com/syncthing/syncthing/model/puller.go:676.3,676.9 1 0
github.com/syncthing/syncthing/model/puller.go:673.12,675.4 1 0
github.com/syncthing/syncthing/model/puller.go:681.48,682.12 1 0
github.com/syncthing/syncthing/model/puller.go:685.3,685.9 1 0
github.com/syncthing/syncthing/model/puller.go:682.12,684.4 1 0
github.com/syncthing/syncthing/model/puller.go:688.20,689.55 1 0
github.com/syncthing/syncthing/model/puller.go:689.55,692.4 2 0
github.com/syncthing/syncthing/model/puller.go:697.25,699.3 1 0
github.com/syncthing/syncthing/model/puller.go:700.67,702.26 2 0
github.com/syncthing/syncthing/model/puller.go:702.26,704.4 1 0
github.com/syncthing/syncthing/model/puller.go:709.24,711.17 2 0
github.com/syncthing/syncthing/model/puller.go:711.17,712.13 1 0
github.com/syncthing/syncthing/model/puller.go:715.4,715.10 1 0
github.com/syncthing/syncthing/model/puller.go:712.13,714.5 1 0
github.com/syncthing/syncthing/model/puller.go:719.11,721.3 1 0
github.com/syncthing/syncthing/model/puller.go:722.60,724.3 1 0
github.com/syncthing/syncthing/model/puller.go:724.4,726.3 1 0
github.com/syncthing/syncthing/model/puller.go:729.74,730.34 1 0
github.com/syncthing/syncthing/model/puller.go:730.34,732.24 2 0
github.com/syncthing/syncthing/model/puller.go:732.24,735.4 2 0
github.com/syncthing/syncthing/model/suppressor.go:34.53,35.25 1 1
github.com/syncthing/syncthing/model/suppressor.go:39.2,40.13 2 1
github.com/syncthing/syncthing/model/suppressor.go:44.2,45.30 2 1
github.com/syncthing/syncthing/model/suppressor.go:48.2,48.40 1 1
github.com/syncthing/syncthing/model/suppressor.go:35.25,37.3 1 1
github.com/syncthing/syncthing/model/suppressor.go:40.13,42.3 1 0
github.com/syncthing/syncthing/model/suppressor.go:45.30,47.3 1 1
github.com/syncthing/syncthing/model/suppressor.go:51.57,53.40 2 1
github.com/syncthing/syncthing/model/suppressor.go:56.2,56.34 1 1
github.com/syncthing/syncthing/model/suppressor.go:53.40,55.3 1 1
github.com/syncthing/syncthing/model/suppressor.go:59.77,61.2 1 1
github.com/syncthing/syncthing/model/suppressor.go:63.82,66.22 2 1
github.com/syncthing/syncthing/model/suppressor.go:69.2,73.10 5 1
github.com/syncthing/syncthing/model/suppressor.go:76.2,80.21 3 1
github.com/syncthing/syncthing/model/suppressor.go:66.22,68.3 1 1
github.com/syncthing/syncthing/model/suppressor.go:73.10,75.3 1 1

View File

@ -5,50 +5,10 @@
package model
import (
"fmt"
"sync"
"time"
"github.com/calmh/syncthing/protocol"
)
func cmMap(cm protocol.ClusterConfigMessage) map[string]map[protocol.NodeID]uint32 {
m := make(map[string]map[protocol.NodeID]uint32)
for _, repo := range cm.Repositories {
m[repo.ID] = make(map[protocol.NodeID]uint32)
for _, node := range repo.Nodes {
var id protocol.NodeID
copy(id[:], node.ID)
m[repo.ID][id] = node.Flags
}
}
return m
}
type ClusterConfigMismatch error
// compareClusterConfig returns nil for two equivalent configurations,
// otherwise a descriptive error
func compareClusterConfig(local, remote protocol.ClusterConfigMessage) error {
lm := cmMap(local)
rm := cmMap(remote)
for repo, lnodes := range lm {
_ = lnodes
if rnodes, ok := rm[repo]; ok {
for node, lflags := range lnodes {
if rflags, ok := rnodes[node]; ok {
if lflags&protocol.FlagShareBits != rflags&protocol.FlagShareBits {
return ClusterConfigMismatch(fmt.Errorf("remote has different sharing flags for node %q in repository %q", node, repo))
}
}
}
}
}
return nil
}
func deadlockDetect(mut sync.Locker, timeout time.Duration) {
go func() {
for {