summaryrefslogtreecommitdiff
path: root/RemoteDaemon/Transport
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-12-02 15:34:15 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-12-02 15:39:49 -0400
commit956d94aca4305d6f957fb4520f059259a2e7bfdb (patch)
treea9dd761624ac7debe647305bf4755a9cadb993c0 /RemoteDaemon/Transport
parent98838a112219dbf57d5ef3a101122cde180faf9f (diff)
plumb peer uuid through to runLocal
This will allow updating transfer logs with the uuid.
Diffstat (limited to 'RemoteDaemon/Transport')
-rw-r--r--RemoteDaemon/Transport/Tor.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/RemoteDaemon/Transport/Tor.hs b/RemoteDaemon/Transport/Tor.hs
index 3c715fbde..2caa7cdb1 100644
--- a/RemoteDaemon/Transport/Tor.hs
+++ b/RemoteDaemon/Transport/Tor.hs
@@ -17,6 +17,7 @@ import Utility.FileMode
import Utility.AuthToken
import Remote.Helper.Tor
import P2P.Protocol
+import P2P.IO
import P2P.Annex
import P2P.Auth
import Annex.UUID
@@ -90,7 +91,12 @@ serveClient th u r q = bracket setup cleanup go
, runIhdl = h
, runOhdl = h
}
- void $ runFullProto runenv (serve u)
+ v <- liftIO $ runNetProto runenv $ serveAuth u
+ case v of
+ Just (Just theiruuid) -> void $
+ runFullProto (Serving theiruuid) runenv $
+ serveAuthed u
+ _ -> return ()
-- Merge the duplicated state back in.
liftAnnex th $ mergeState st'
debugM "remotedaemon" "done with TOR connection"