Rework OMEMO handling on disconnect

* Fix missing destruction of `session_store` and mutex
* Replace `glib_hash_table_free()`
  The glib API `g_hash_table_destroy()` does exactly the same.
* Use the default libsignal `destroy_func` instead of doing that manually
* Set internal state to `0` after everything is cleaned up

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
Steffen Jaeckel
2023-11-16 13:24:17 +01:00
parent 835ea397ac
commit fdfe3e2ad9
5 changed files with 44 additions and 51 deletions

View File

@@ -774,13 +774,6 @@ unique_filename_from_url(const char* url, const char* path)
return unique_filename;
}
void
glib_hash_table_free(GHashTable* hash_table)
{
g_hash_table_remove_all(hash_table);
g_hash_table_unref(hash_table);
}
/* build profanity version string.
* example: 0.13.1dev.master.69d8c1f9
*/