Stop and Restart File Shares #447

Merged
sarah merged 4 commits from filesharing-persist into master 2022-07-06 16:15:38 +00:00
3 changed files with 4 additions and 3 deletions
Showing only changes of commit 1a24e8d4b1 - Show all commits

View File

@ -92,7 +92,7 @@ func (f *Functionality) DownloadFile(profile peer.CwtchPeer, conversationID int,
// ReShareFiles given a profile we iterate through all existing fileshares and re-share them
// if the time limit has not expired
func (f *Functionality) ReShareFiles(profile peer.CwtchPeer) error {
keys, err := profile.GetScopedZonedAttributes(attr.LocalScope, attr.FilesharingZone)
keys, err := profile.GetScopedZonedAttributeKeys(attr.LocalScope, attr.FilesharingZone)
if err != nil {
return err
}

View File

@ -186,7 +186,7 @@ func (cp *cwtchPeer) GetScopedZonedAttribute(scope attr.Scope, zone attr.Zone, k
}
// GetScopedZonedAttributes finds all keys associated with the given scope and zone
func (cp *cwtchPeer) GetScopedZonedAttributes(scope attr.Scope, zone attr.Zone) ([]string, error) {
func (cp *cwtchPeer) GetScopedZonedAttributeKeys(scope attr.Scope, zone attr.Zone) ([]string, error) {
cp.mutex.Lock()
defer cp.mutex.Unlock()
scopedZonedKey := scope.ConstructScopedZonedPath(zone.ConstructZonedPath(""))

View File

@ -81,7 +81,8 @@ type CwtchPeer interface {
// scope.zone.key = value
GetScopedZonedAttribute(scope attr.Scope, zone attr.Zone, key string) (string, bool)
GetScopedZonedAttributes(scope attr.Scope, zone attr.Zone) ([]string, error)
// GetScopedZonedAttributeKeys returns all keys associated with a given scope and zone
GetScopedZonedAttributeKeys(scope attr.Scope, zone attr.Zone) ([]string, error)
AccessPeeringState
ModifyPeeringState