summaryrefslogtreecommitdiff
path: root/hosts.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2014-07-31 03:22:49 -0400
committerjoe <joe@jerkface.net>2014-07-31 03:22:49 -0400
commitfa436b19b25a6a908a78bc6874f1adf3a70ea8a9 (patch)
treeabad65f8d0cb24d483762a0f7ae3ae8acda244a9 /hosts.hs
parent77f46d6c08671d5e038e327cc5cd333df3aaf696 (diff)
Fixed -c option to hosts utility
Diffstat (limited to 'hosts.hs')
-rw-r--r--hosts.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/hosts.hs b/hosts.hs
index afd60fc..6c93b10 100644
--- a/hosts.hs
+++ b/hosts.hs
@@ -64,10 +64,8 @@ crap strs = do
64grokPairing :: Bool -> Hosts -> (String,Either String SockAddr) -> Hosts 64grokPairing :: Bool -> Hosts -> (String,Either String SockAddr) -> Hosts
65grokPairing bCanon hosts (name,eaddr) = 65grokPairing bCanon hosts (name,eaddr) =
66 case eaddr of 66 case eaddr of
67 Right addr -> assign addr (L.pack name) hosts 67 Right addr -> assignName' bCanon addr (L.pack name) hosts
68 Left "delete" -> error "deletion not implemented." 68 Left "delete" -> error "deletion not implemented."
69 where
70 assign = if bCanon then assignNewName else assignName
71 69
72main = do 70main = do
73 args <- getArgs 71 args <- getArgs