diff options
Diffstat (limited to 'src/Network/Tox/Avahi.hs')
-rw-r--r-- | src/Network/Tox/Avahi.hs | 5 |
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 | |||
11 | import Data.Foldable | 11 | import Data.Foldable |
12 | import Network.Address | 12 | import Network.Address |
13 | import Network.Avahi | 13 | import Network.Avahi |
14 | import Network.BSD (getHostName) | ||
14 | import Network.Tox.NodeId | 15 | import Network.Tox.NodeId |
15 | import Text.Read | 16 | import Text.Read |
16 | 17 | ||
@@ -41,7 +42,9 @@ announceToxServiceWithHostname = (boobs.boobs) announce toxService | |||
41 | where boobs = ((.).(.)) | 42 | where boobs = ((.).(.)) |
42 | 43 | ||
43 | announceToxService :: PortNumber -> NodeId -> (Maybe NodeId) -> IO () | 44 | announceToxService :: PortNumber -> NodeId -> (Maybe NodeId) -> IO () |
44 | announceToxService = announceToxServiceWithHostname "" | 45 | announceToxService a b c = do |
46 | h <- getHostName | ||
47 | announceToxServiceWithHostname h a b c | ||
45 | 48 | ||
46 | queryToxService :: (NodeInfo -> Maybe NodeId -> IO ()) -> IO () | 49 | queryToxService :: (NodeInfo -> Maybe NodeId -> IO ()) -> IO () |
47 | queryToxService cb = | 50 | queryToxService cb = |