equal
deleted
inserted
replaced
16 |
16 |
17 handleCmd_checker :: CmdHandler |
17 handleCmd_checker :: CmdHandler |
18 |
18 |
19 handleCmd_checker ["READY"] = return [CheckRecord] |
19 handleCmd_checker ["READY"] = return [CheckRecord] |
20 |
20 |
|
21 handleCmd_checker ["CHECKED", "FAIL", msg] = do |
|
22 isChecking <- liftM (isJust . checkInfo) thisClient |
|
23 if not isChecking then |
|
24 return [] |
|
25 else |
|
26 return [CheckFailed msg, ModifyClient $ \c -> c{checkInfo = Nothing}] |
|
27 |
|
28 |
|
29 handleCmd_checker ("CHECKED" : "OK" : info) = do |
|
30 isChecking <- liftM (isJust . checkInfo) thisClient |
|
31 if not isChecking then |
|
32 return [] |
|
33 else |
|
34 return [CheckSuccess info, ModifyClient $ \c -> c{checkInfo = Nothing}] |
|
35 |
21 handleCmd_checker _ = return [ProtocolError "Unknown command"] |
36 handleCmd_checker _ = return [ProtocolError "Unknown command"] |