Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Simplex/Messaging/Agent/Store/AgentStore.hs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ checkConfirmedSndQueueExists_ db SndQueue {server, sndId} =
DB.query
db
( "SELECT 1 FROM snd_queues WHERE host = ? AND port = ? AND snd_id = ? AND status != ? LIMIT 1"
#if defined(dpPostgres)
#if defined(dbPostgres)
<> " FOR UPDATE"
#endif
)
Expand Down
1 change: 1 addition & 0 deletions src/Simplex/Messaging/Util.hs
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ groupAllOn f = groupOn f . sortOn f
-- n must be > 0
toChunks :: Int -> [a] -> [NonEmpty a]
toChunks _ [] = []
toChunks 0 (x : xs) = [x :| xs]
toChunks n xs =
let (ys, xs') = splitAt n xs
in maybe id (:) (L.nonEmpty ys) (toChunks n xs')
Expand Down
11 changes: 0 additions & 11 deletions src/Simplex/RemoteControl/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module Simplex.RemoteControl.Types
RCPVersion,
VersionRCP,
VersionRangeRCP,
IpProbe (..),
RCHostHello (..),
RCCtrlHello (..),
RCHostPairing (..),
Expand Down Expand Up @@ -141,16 +140,6 @@ currentRCPVersion = VersionRCP 1
supportedRCPVRange :: VersionRangeRCP
supportedRCPVRange = mkVersionRange (VersionRCP 1) currentRCPVersion

data IpProbe = IpProbe
{ versionRange :: VersionRangeRCP,
randomNonce :: ByteString
}
deriving (Show)

instance Encoding IpProbe where
smpEncode IpProbe {versionRange, randomNonce} = smpEncode (versionRange, 'I', randomNonce)
smpP = IpProbe <$> (smpP <* "I") *> smpP

-- * Session

data RCHostHello = RCHostHello
Expand Down
Loading