Commit fbbb6f7d authored by TomekWasilczyk's avatar TomekWasilczyk

Style fixes, additional assertion

parent 99e562ea
......@@ -310,6 +310,8 @@ otrg_conversation_set_last_received_instance(PurpleConversation *conv,
otrl_instag_t
otrg_conversation_get_last_received_instance(PurpleConversation *conv)
{
g_return_val_if_fail(conv != NULL, OTRL_INSTAG_BEST);
return GPOINTER_TO_INT(otrg_conv_get_data(conv,
"otr-last_received_ctx"));
}
......
......@@ -308,7 +308,7 @@ otrg_plugin_privkeygen_waitall(void)
otrg_dialog_private_key_wait_done(tdata->wait_handle);
otrl_privkey_generate_cancelled(otrg_plugin_userstate, tdata->new_key);
g_free(tdata);
}
}
it = otrg_plugin_privkeygen_zombies;
otrg_plugin_privkeygen_zombies = NULL;
......
......@@ -1359,8 +1359,7 @@ otrg_purple3_conv_update_state(ConnContext *context)
ConnContext *m_context = NULL;
GList *contexts;
guint contexts_count = 0;
PurpleAccount *account;
const gchar *cname;
OtrlPolicy policy;
g_return_if_fail(context != NULL);
......@@ -1378,9 +1377,10 @@ otrg_purple3_conv_update_state(ConnContext *context)
contexts_count--;
otrg_conversation_set_multi_instance(conv, (contexts_count >= 2));
account = purple_conversation_get_account(conv);
cname = purple_conversation_get_name(conv);
if (otrg_buddy_prefs_get_policy(account, cname) == OTRL_POLICY_NEVER) {
policy = otrg_buddy_prefs_get_policy(
purple_conversation_get_account(conv),
purple_conversation_get_name(conv));
if (policy == OTRL_POLICY_NEVER) {
purple_conversation_set_e2ee_state(conv, NULL);
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment