diff options
author | Will Thompson <will@willthompson.co.uk> | 2012-01-17 15:58:51 +0000 |
---|---|---|
committer | Will Thompson <will@willthompson.co.uk> | 2012-01-17 15:58:51 +0000 |
commit | 3e092a4cc41538581dac6ec012ffd72b669fba23 (patch) | |
tree | 2c8f98e88ee22b686855aad25cead036acb3c11c | |
parent | 73188e8d1c6333f7500f856ffd7aa12a66fccc9b (diff) |
Pcap: correctly handle NameOwnerChanged for unique names
I have no idea how this ever worked: Connected and Disconnected were
signalled back-to-front, so the first you'd ever see of a unique name on
the bus would be Disconnected, and the last would be Connected.
-rw-r--r-- | Bustle/Loader/Pcap.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Bustle/Loader/Pcap.hs b/Bustle/Loader/Pcap.hs index e93e555..711e0b1 100644 --- a/Bustle/Loader/Pcap.hs +++ b/Bustle/Loader/Pcap.hs @@ -107,8 +107,8 @@ bustlifyNOC :: (BusName, Maybe BusName, Maybe BusName) bustlifyNOC ns@(name, oldOwner, newOwner) | isUnique name = case (oldOwner, newOwner) of - (Just _, Nothing) -> B.Connected (uniquify name) - (Nothing, Just _) -> B.Disconnected (uniquify name) + (Nothing, Just _) -> B.Connected (uniquify name) + (Just _, Nothing) -> B.Disconnected (uniquify name) _ -> error $ "wtf: NOC" ++ show ns | otherwise = B.NameChanged (otherify name) $ case (oldOwner, newOwner) of |