mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-16 10:28:49 -07:00
This commit is contained in:
parent
81553b4da7
commit
f13e6ca631
@ -1228,11 +1228,10 @@ func (m *model) ClusterConfig(deviceID protocol.DeviceID, cm protocol.ClusterCon
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
changedHere, tempIndexFolders, paused, err := m.ccHandleFolders(cm.Folders, deviceCfg, ccDeviceInfos, indexSenderRegistry)
|
tempIndexFolders, paused, err := m.ccHandleFolders(cm.Folders, deviceCfg, ccDeviceInfos, indexSenderRegistry)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
changed = changed || changedHere
|
|
||||||
|
|
||||||
m.pmut.Lock()
|
m.pmut.Lock()
|
||||||
m.remotePausedFolders[deviceID] = paused
|
m.remotePausedFolders[deviceID] = paused
|
||||||
@ -1276,8 +1275,7 @@ func (m *model) ClusterConfig(deviceID protocol.DeviceID, cm protocol.ClusterCon
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *model) ccHandleFolders(folders []protocol.Folder, deviceCfg config.DeviceConfiguration, ccDeviceInfos map[string]*indexSenderStartInfo, indexSenders *indexSenderRegistry) (bool, []string, map[string]struct{}, error) {
|
func (m *model) ccHandleFolders(folders []protocol.Folder, deviceCfg config.DeviceConfiguration, ccDeviceInfos map[string]*indexSenderStartInfo, indexSenders *indexSenderRegistry) ([]string, map[string]struct{}, error) {
|
||||||
var changed bool
|
|
||||||
var folderDevice config.FolderDeviceConfiguration
|
var folderDevice config.FolderDeviceConfiguration
|
||||||
tempIndexFolders := make([]string, 0, len(folders))
|
tempIndexFolders := make([]string, 0, len(folders))
|
||||||
paused := make(map[string]struct{}, len(folders))
|
paused := make(map[string]struct{}, len(folders))
|
||||||
@ -1335,7 +1333,7 @@ func (m *model) ccHandleFolders(folders []protocol.Folder, deviceCfg config.Devi
|
|||||||
l.Warnln(msg)
|
l.Warnln(msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
return changed, tempIndexFolders, paused, err
|
return tempIndexFolders, paused, err
|
||||||
}
|
}
|
||||||
if devErrs, ok := m.folderEncryptionFailures[folder.ID]; ok {
|
if devErrs, ok := m.folderEncryptionFailures[folder.ID]; ok {
|
||||||
if len(devErrs) == 1 {
|
if len(devErrs) == 1 {
|
||||||
@ -1375,7 +1373,7 @@ func (m *model) ccHandleFolders(folders []protocol.Folder, deviceCfg config.Devi
|
|||||||
|
|
||||||
indexSenders.removeAllExcept(seenFolders)
|
indexSenders.removeAllExcept(seenFolders)
|
||||||
|
|
||||||
return changed, tempIndexFolders, paused, nil
|
return tempIndexFolders, paused, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *model) ccCheckEncryption(fcfg config.FolderConfiguration, folderDevice config.FolderDeviceConfiguration, ccDeviceInfos *indexSenderStartInfo, deviceUntrusted bool) error {
|
func (m *model) ccCheckEncryption(fcfg config.FolderConfiguration, folderDevice config.FolderDeviceConfiguration, ccDeviceInfos *indexSenderStartInfo, deviceUntrusted bool) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user