From 388c301222586583a0144f7229a564cf07b597d4 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sat, 24 Sep 2022 20:51:00 +0200 Subject: Remove no-op code --- lib/e2ee/qolmoutboundsession.cpp | 11 ----------- lib/room.cpp | 1 - 2 files changed, 12 deletions(-) (limited to 'lib') diff --git a/lib/e2ee/qolmoutboundsession.cpp b/lib/e2ee/qolmoutboundsession.cpp index 56f78906..1176d790 100644 --- a/lib/e2ee/qolmoutboundsession.cpp +++ b/lib/e2ee/qolmoutboundsession.cpp @@ -45,12 +45,6 @@ QOlmOutboundGroupSessionPtr QOlmOutboundGroupSession::create() olmOutboundGroupSession)); } - // FIXME: is it used anywhere? - const auto keyMaxLength = olm_outbound_group_session_key_length(olmOutboundGroupSession); - QByteArray keyBuffer(keyMaxLength, '\0'); - olm_outbound_group_session_key(olmOutboundGroupSession, reinterpret_cast(keyBuffer.data()), - keyMaxLength); - return std::make_unique(olmOutboundGroupSession); } @@ -85,11 +79,6 @@ QOlmExpected QOlmOutboundGroupSession::unpickle( return olm_outbound_group_session_last_error_code( olmOutboundGroupSession); } - const auto idMaxLength = olm_outbound_group_session_id_length(olmOutboundGroupSession); - QByteArray idBuffer(idMaxLength, '\0'); - olm_outbound_group_session_id(olmOutboundGroupSession, reinterpret_cast(idBuffer.data()), - idBuffer.length()); - // FIXME: idBuffer doesn't seem to be used, is it needed here? key.clear(); return std::make_unique(olmOutboundGroupSession); diff --git a/lib/room.cpp b/lib/room.cpp index 5fdff036..0cf818ce 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -444,7 +444,6 @@ public: connection->saveCurrentOutboundMegolmSession( id, *currentOutboundMegolmSession); - currentOutboundMegolmSession->sessionKey(); addInboundGroupSession(currentOutboundMegolmSession->sessionId(), currentOutboundMegolmSession->sessionKey(), q->localUser()->id(), "SELF"_ls); -- cgit v1.2.3