Mercurial > hg
diff mcabber/mcabber/xmpp.c @ 2044:c00b919cf4ac
Hopefully fix #94 (OTR leak when block_unsubscribed is set)
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Tue, 27 Nov 2012 15:26:26 +0100 |
parents | f8958ab545ac |
children | f52b47f29ca0 |
line wrap: on
line diff
--- a/mcabber/mcabber/xmpp.c Tue Nov 27 10:33:08 2012 +0100 +++ b/mcabber/mcabber/xmpp.c Tue Nov 27 15:26:26 2012 +0100 @@ -1104,17 +1104,6 @@ check_signature(bjid, rname, node_signed, decrypted_pgp); #endif -#ifdef HAVE_LIBOTR - if (otr_enabled()) { - decrypted_otr = (char*)body; - otr_msg = otr_receive(&decrypted_otr, bjid, &free_msg); - if (!decrypted_otr) { - goto gotmessage_return; - } - body = decrypted_otr; - } -#endif - // Check for unexpected groupchat messages // If we receive a groupchat message from a room we're not a member of, // this is probably a server issue and the best we can do is to send @@ -1163,6 +1152,17 @@ g_free(sbjid); } +#ifdef HAVE_LIBOTR + if (otr_enabled()) { + decrypted_otr = (char*)body; + otr_msg = otr_receive(&decrypted_otr, bjid, &free_msg); + if (!decrypted_otr) { + goto gotmessage_return; + } + body = decrypted_otr; + } +#endif + { // format and pass message for further processing gchar *fullbody = NULL; guint encrypted;