mirror of
https://github.com/profanity-im/profanity.git
synced 2024-09-29 19:56:07 -04:00
commit
87935b744d
@ -8618,6 +8618,7 @@ cmd_omemo_gen(ProfWin* window, const char* const command, gchar** args)
|
|||||||
ui_update();
|
ui_update();
|
||||||
ProfAccount* account = accounts_get_account(session_get_account_name());
|
ProfAccount* account = accounts_get_account(session_get_account_name());
|
||||||
omemo_generate_crypto_materials(account);
|
omemo_generate_crypto_materials(account);
|
||||||
|
account_free(account);
|
||||||
cons_show("OMEMO cryptographic materials generated. Your Device ID is %d.", omemo_device_id());
|
cons_show("OMEMO cryptographic materials generated. Your Device ID is %d.", omemo_device_id());
|
||||||
return TRUE;
|
return TRUE;
|
||||||
#else
|
#else
|
||||||
|
@ -145,7 +145,7 @@ buffer_remove_entry(ProfBuff buffer, int entry)
|
|||||||
GSList* node = g_slist_nth(buffer->entries, entry);
|
GSList* node = g_slist_nth(buffer->entries, entry);
|
||||||
ProfBuffEntry* e = node->data;
|
ProfBuffEntry* e = node->data;
|
||||||
buffer->lines -= e->_lines;
|
buffer->lines -= e->_lines;
|
||||||
_free_entry(node->data);
|
_free_entry(e);
|
||||||
buffer->entries = g_slist_delete_link(buffer->entries, node);
|
buffer->entries = g_slist_delete_link(buffer->entries, node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -391,16 +391,16 @@ omemo_receive_message(xmpp_stanza_t* const stanza, gboolean* trusted)
|
|||||||
|
|
||||||
xmpp_stanza_t* payload = xmpp_stanza_get_child_by_name(encrypted, "payload");
|
xmpp_stanza_t* payload = xmpp_stanza_get_child_by_name(encrypted, "payload");
|
||||||
if (!payload) {
|
if (!payload) {
|
||||||
return NULL;
|
goto quit;
|
||||||
}
|
}
|
||||||
payload_text = xmpp_stanza_get_text(payload);
|
payload_text = xmpp_stanza_get_text(payload);
|
||||||
if (!payload_text) {
|
if (!payload_text) {
|
||||||
return NULL;
|
goto quit;
|
||||||
}
|
}
|
||||||
size_t payload_len;
|
size_t payload_len;
|
||||||
payload_raw = g_base64_decode(payload_text, &payload_len);
|
payload_raw = g_base64_decode(payload_text, &payload_len);
|
||||||
if (!payload_raw) {
|
if (!payload_raw) {
|
||||||
return NULL;
|
goto quit;
|
||||||
}
|
}
|
||||||
|
|
||||||
xmpp_stanza_t* key_stanza;
|
xmpp_stanza_t* key_stanza;
|
||||||
@ -444,6 +444,7 @@ omemo_receive_message(xmpp_stanza_t* const stanza, gboolean* trusted)
|
|||||||
g_list_free_full(keys, (GDestroyNotify)omemo_key_free);
|
g_list_free_full(keys, (GDestroyNotify)omemo_key_free);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
quit:
|
||||||
g_free(iv_raw);
|
g_free(iv_raw);
|
||||||
g_free(payload_raw);
|
g_free(payload_raw);
|
||||||
g_free(iv_text);
|
g_free(iv_text);
|
||||||
|
Loading…
Reference in New Issue
Block a user