1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-23 21:45:30 +00:00

Don't unload OMEMO cryto on disconnect if OMEMO wasn't loaded

If OMEMO wasn't loaded, removing key would create empty identity.txt
file. Then at load time it would segfault profanity.

Another commit should fix load of malformed identity.txt.
This commit is contained in:
Paul Fariello 2019-04-12 08:24:50 +03:20
parent 0857b5ee4e
commit c33d8e5f0b

View File

@ -241,6 +241,10 @@ omemo_on_connect(ProfAccount *account)
void
omemo_on_disconnect(void)
{
if (!loaded) {
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);