1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Free id for OTR messages

This commit is contained in:
James Booth 2015-08-20 22:02:58 +01:00
parent 3000916ad9
commit c18b7f4d67
2 changed files with 10 additions and 5 deletions

View File

@ -4530,7 +4530,8 @@ cmd_otr(ProfWin *window, const char * const command, gchar **args)
if (!otr_is_secure(barejid)) {
char *otr_query_message = otr_start_query();
message_send_chat_otr(barejid, otr_query_message);
char *id = message_send_chat_otr(barejid, otr_query_message);
free(id);
return TRUE;
}
@ -4562,7 +4563,8 @@ cmd_otr(ProfWin *window, const char * const command, gchar **args)
}
char *otr_query_message = otr_start_query();
message_send_chat_otr(chatwin->barejid, otr_query_message);
char *id = message_send_chat_otr(chatwin->barejid, otr_query_message);
free(id);
return TRUE;
}

View File

@ -110,7 +110,8 @@ static void
cb_inject_message(void *opdata, const char *accountname,
const char *protocol, const char *recipient, const char *message)
{
message_send_chat_otr(recipient, message);
char *id = message_send_chat_otr(recipient, message);
free(id);
}
static void
@ -291,7 +292,8 @@ otr_on_message_recv(const char * const barejid, const char * const resource, con
memmove(whitespace_base, whitespace_base+tag_length, tag_length);
char *otr_query_message = otr_start_query();
cons_show("OTR Whitespace pattern detected. Attempting to start OTR session...");
message_send_chat_otr(barejid, otr_query_message);
char *id = message_send_chat_otr(barejid, otr_query_message);
free(id);
}
}
}
@ -304,7 +306,8 @@ otr_on_message_recv(const char * const barejid, const char * const resource, con
if (policy == PROF_OTRPOLICY_ALWAYS && *was_decrypted == FALSE && !whitespace_base) {
char *otr_query_message = otr_start_query();
cons_show("Attempting to start OTR session...");
message_send_chat_otr(barejid, otr_query_message);
char *id = message_send_chat_otr(barejid, otr_query_message);
free(id);
}
return decrypted;