From 9c0a3954086491dbc70a0cf54c9ff90f7bc3094f Mon Sep 17 00:00:00 2001 From: Paul Fariello Date: Fri, 12 Apr 2019 19:10:48 +0320 Subject: [PATCH] Don't persist OMEMO {signed,}prekey cleaning on disconnect We should not remove signed prekey and prekey from persistent storage when cleaning OMEMO store on disconnect. --- src/omemo/omemo.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/omemo/omemo.c b/src/omemo/omemo.c index c15517a2..b85029ee 100644 --- a/src/omemo/omemo.c +++ b/src/omemo/omemo.c @@ -247,17 +247,7 @@ omemo_on_disconnect(void) return; } - signal_protocol_signed_pre_key_remove_key(omemo_ctx.store, omemo_ctx.signed_pre_key_id); _g_hash_table_free(omemo_ctx.signed_pre_key_store); - - GHashTableIter iter; - gpointer id; - - g_hash_table_iter_init(&iter, omemo_ctx.pre_key_store); - while (g_hash_table_iter_next(&iter, &id, NULL)) { - signal_protocol_pre_key_remove_key(omemo_ctx.store, GPOINTER_TO_INT(id)); - } - _g_hash_table_free(omemo_ctx.pre_key_store); g_string_free(omemo_ctx.identity_filename, TRUE);