summaryrefslogtreecommitdiffhomepage
path: root/Storage.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Storage.hs')
-rw-r--r--Storage.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Storage.hs b/Storage.hs
index aa52d7c..fcd2f7e 100644
--- a/Storage.hs
+++ b/Storage.hs
@@ -90,13 +90,14 @@ storeShares (StorageLocations locs) allsis shares updateprogress = do
-- Assumes that each location only contains one share. So, once a
-- share has been found on a location, can avoid asking that location
-- for any other shares.
-retrieveShares :: StorageLocations -> ShareIdents -> UpdateProgress -> IO (S.Set Share, ShareIdents)
+retrieveShares :: StorageLocations -> ShareIdents -> UpdateProgress -> IO (S.Set Share, ShareIdents, [Server])
retrieveShares (StorageLocations locs) sis updateprogress = do
let (is, sis') = nextShareIdents sis
let want = zip [1..] (S.toList is)
(shares, usedlocs, _unusedlocs) <- go locs [] want []
_ <- mapM_ obscureShares usedlocs
- return (S.fromList shares, sis')
+ let usedservers = mapMaybe getServer usedlocs
+ return (S.fromList shares, sis', usedservers)
where
go unusedlocs usedlocs [] shares = return (shares, usedlocs, unusedlocs)
go [] usedlocs _ shares = return (shares, usedlocs, [])