From 956d94aca4305d6f957fb4520f059259a2e7bfdb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Dec 2016 15:34:15 -0400 Subject: plumb peer uuid through to runLocal This will allow updating transfer logs with the uuid. --- RemoteDaemon/Transport/Tor.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'RemoteDaemon') 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" -- cgit v1.2.3