diff options
author | Joey Hess <joey@kitenet.net> | 2012-09-11 12:58:00 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-09-11 12:58:00 -0400 |
commit | aace44454a8866e8dab251c2b9c98e2d48e3f071 (patch) | |
tree | fbde4f1d7012ef2e3da239c1ad59ee4f7d1bb689 /Assistant/Pairing.hs | |
parent | 16d27e9c023231dcf80923d72633c80dbd91116e (diff) |
keep track of the stage we're at in pairing
This avoids us responding to our own pairing messages, as well
as ignoring any out of order messages that might be received somehow.
Diffstat (limited to 'Assistant/Pairing.hs')
-rw-r--r-- | Assistant/Pairing.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Assistant/Pairing.hs b/Assistant/Pairing.hs index ca0cc2f39..c519dbd88 100644 --- a/Assistant/Pairing.hs +++ b/Assistant/Pairing.hs @@ -26,7 +26,7 @@ data PairStage | PairAck {- "I saw your PairAck; you can stop sending them." -} | PairDone - deriving (Eq, Read, Show) + deriving (Eq, Read, Show, Ord) newtype PairMsg = PairMsg (Verifiable (PairStage, PairData, SomeAddr)) deriving (Eq, Read, Show) @@ -66,6 +66,7 @@ data PairingInProgress = PairingInProgress , inProgressThreadId :: Maybe ThreadId , inProgressSshKeyPair :: SshKeyPair , inProgressPairData :: PairData + , inProgressPairStage :: PairStage } data SomeAddr = IPv4Addr HostAddress | IPv6Addr HostAddress6 |