diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-09-05 14:39:44 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-09-05 14:39:44 -0400 |
commit | 7a65879fd2cbabee30ab90763914b36d2102d653 (patch) | |
tree | fd0cdd71657bd42d69ee30f85c77f17d1bfbff32 /Assistant | |
parent | 751322890adef4e1d3390bdd69b88462b9b01770 (diff) |
switch away from deprecated interface
Again the new stuff works back to network-2.4, so no need to adjust cabal
bounds.
Diffstat (limited to 'Assistant')
-rw-r--r-- | Assistant/Pairing/Network.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Assistant/Pairing/Network.hs b/Assistant/Pairing/Network.hs index 694dcbbcc..09f0fc320 100644 --- a/Assistant/Pairing/Network.hs +++ b/Assistant/Pairing/Network.hs @@ -20,6 +20,8 @@ import Utility.Verifiable import Network.Multicast import Network.Info import Network.Socket +import qualified Network.Socket.ByteString as B +import qualified Data.ByteString.UTF8 as BU8 import qualified Data.Map as M import Control.Concurrent @@ -63,10 +65,11 @@ multicastPairMsg repeats secret pairdata stage = go M.empty repeats withSocketsDo $ bracket setup cleanup use where setup = multicastSender (multicastAddress IPv4AddrClass) pairingPort - cleanup (sock, _) = sClose sock -- FIXME does not work + cleanup (sock, _) = close sock -- FIXME does not work use (sock, addr) = do setInterface sock (showAddr i) - maybe noop (\s -> void $ sendTo sock s addr) + maybe noop + (\s -> void $ B.sendTo sock (BU8.fromString s) addr) (M.lookup i cache) updatecache cache [] = cache updatecache cache (i:is) |