summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2018-06-24 19:25:42 -0400
committerAndrew Cady <d@jerkface.net>2018-06-24 19:47:43 -0400
commit505ccbbf01d341e6c53af7b005ba8affe956d358 (patch)
tree5a5e263c5e5e41610e099495faaa8b5fef675038 /src
parent94c6190ea502a29c6a2e17075f5f598e7034f068 (diff)
supply hostname for dnssd display
Diffstat (limited to 'src')
-rw-r--r--src/Network/Tox/Avahi.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Network/Tox/Avahi.hs b/src/Network/Tox/Avahi.hs
index 559e5fd7..635ba656 100644
--- a/src/Network/Tox/Avahi.hs
+++ b/src/Network/Tox/Avahi.hs
@@ -11,6 +11,7 @@ import Control.Applicative
11import Data.Foldable 11import Data.Foldable
12import Network.Address 12import Network.Address
13import Network.Avahi 13import Network.Avahi
14import Network.BSD (getHostName)
14import Network.Tox.NodeId 15import Network.Tox.NodeId
15import Text.Read 16import Text.Read
16 17
@@ -41,7 +42,9 @@ announceToxServiceWithHostname = (boobs.boobs) announce toxService
41 where boobs = ((.).(.)) 42 where boobs = ((.).(.))
42 43
43announceToxService :: PortNumber -> NodeId -> (Maybe NodeId) -> IO () 44announceToxService :: PortNumber -> NodeId -> (Maybe NodeId) -> IO ()
44announceToxService = announceToxServiceWithHostname "" 45announceToxService a b c = do
46 h <- getHostName
47 announceToxServiceWithHostname h a b c
45 48
46queryToxService :: (NodeInfo -> Maybe NodeId -> IO ()) -> IO () 49queryToxService :: (NodeInfo -> Maybe NodeId -> IO ()) -> IO ()
47queryToxService cb = 50queryToxService cb =