diff options
author | Joey Hess <joey@kitenet.net> | 2012-08-10 18:42:44 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-08-10 18:42:44 -0400 |
commit | 8ba983065324cc850ee25de9a537fb7f29ef4bea (patch) | |
tree | 6a1eeaa6f532670b630c22d425d8e4f63d1127d6 /Logs | |
parent | 21bd92f077c78320bd1ef2637962f53e97af40d1 (diff) |
implement pausing of transfers
A paused transfer's thread keeps running, keeping the slot in use.
This is intentional; pausing a transfer should not let other
queued transfers to run in its place.
Diffstat (limited to 'Logs')
-rw-r--r-- | Logs/Transfer.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Logs/Transfer.hs b/Logs/Transfer.hs index eb5ab14fe..590e73664 100644 --- a/Logs/Transfer.hs +++ b/Logs/Transfer.hs @@ -45,6 +45,7 @@ data TransferInfo = TransferInfo , transferRemote :: Maybe Remote , bytesComplete :: Maybe Integer , associatedFile :: Maybe FilePath + , transferPaused :: Bool } deriving (Show, Eq, Ord) @@ -93,6 +94,7 @@ runTransfer t file a = do <*> pure Nothing -- not 0; transfer may be resuming <*> pure Nothing <*> pure file + <*> pure False bracketIO (prep tfile mode info) (cleanup tfile) a where prep tfile mode info = do @@ -185,6 +187,7 @@ readTransferInfo pid s = <*> pure Nothing <*> pure Nothing <*> pure (if null filename then Nothing else Just filename) + <*> pure False _ -> Nothing where (bits, filebits) = splitAt 1 $ lines s |