external special remote protocol: Added GETUUID.
This commit is contained in:
parent
2cf1c879c9
commit
ed1fcab6d7
4 changed files with 13 additions and 2 deletions
|
@ -226,6 +226,8 @@ handleRequest' lck external req mp responsehandler
|
|||
creds <- fromMaybe ("", "") <$>
|
||||
getRemoteCredPair c (credstorage setting)
|
||||
sendMessage lck external $ CREDS (fst creds) (snd creds)
|
||||
handleRemoteRequest GETUUID = sendMessage lck external $
|
||||
VALUE $ fromUUID $ externalUUID external
|
||||
handleRemoteRequest (VERSION _) =
|
||||
sendMessage lck external $ ERROR "too late to send VERSION"
|
||||
|
||||
|
|
2
Remote/External/Types.hs
vendored
2
Remote/External/Types.hs
vendored
|
@ -166,6 +166,7 @@ data RemoteRequest
|
|||
| GETCONFIG Setting
|
||||
| SETCREDS Setting String String
|
||||
| GETCREDS Setting
|
||||
| GETUUID
|
||||
deriving (Show)
|
||||
|
||||
instance Receivable RemoteRequest where
|
||||
|
@ -176,6 +177,7 @@ instance Receivable RemoteRequest where
|
|||
parseCommand "GETCONFIG" = parse1 GETCONFIG
|
||||
parseCommand "SETCREDS" = parse3 SETCREDS
|
||||
parseCommand "GETCREDS" = parse1 GETCREDS
|
||||
parseCommand "GETUUID" = parse0 GETUUID
|
||||
parseCommand _ = parseFail
|
||||
|
||||
-- Responses to RemoteRequest.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue