From dc8711be30f69847ad90146ffb4c244b0a144f63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Wed, 31 Mar 2021 11:38:15 +0200 Subject: [PATCH] crypto: Add some TODOs about locking --- .../matrix/android/sdk/internal/crypto/DefaultCryptoService.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/DefaultCryptoService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/DefaultCryptoService.kt index e14f6f4e0b..e60e2a7a0d 100755 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/DefaultCryptoService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/DefaultCryptoService.kt @@ -694,6 +694,7 @@ internal class DefaultCryptoService @Inject constructor( } private suspend fun preshareGroupSession(roomId: String, roomMembers: List) { + // TODO this needs to be locked per room val request = olmMachine!!.getMissingSessions(roomMembers) if (request != null) { @@ -772,6 +773,7 @@ internal class DefaultCryptoService @Inject constructor( } private suspend fun claimKeys(request: Request.KeysClaim) { + // TODO this needs to be locked per call val claimParams = ClaimOneTimeKeysForUsersDeviceTask.Params(request.oneTimeKeys) val response = oneTimeKeysForUsersDeviceTask.execute(claimParams) val adapter = MoshiProvider @@ -783,6 +785,7 @@ internal class DefaultCryptoService @Inject constructor( } private suspend fun sendOutgoingRequests() { + // TODO this needs to be locked per call // TODO these requests should be sent out in parallel for (outgoingRequest in olmMachine!!.outgoingRequests()) { when (outgoingRequest) {