diff mcabber/mcabber/hbuf.c @ 2032:f740c4128f76

Fix receipts handling according to recent XEP updates * add lm_get_uid() @xmpp_helper.h * identify receipts by id attribute of 'received' subelement instead of stanza id
author Myhailo Danylenko <isbear@ukrpost.net>
date Sun, 14 Oct 2012 17:39:11 +0200
parents 10eead2ba1b7
children f5402d705f67
line wrap: on
line diff
--- a/mcabber/mcabber/hbuf.c	Sat Oct 13 19:53:12 2012 +0200
+++ b/mcabber/mcabber/hbuf.c	Sun Oct 14 17:39:11 2012 +0200
@@ -525,7 +525,7 @@
 //  hbuf_remove_receipt(hbuf, xep184)
 // Remove the Receipt Flag for the message with the given xep184 id
 // Returns TRUE if it was found and removed, otherwise FALSE
-gboolean hbuf_remove_receipt(GList *hbuf, gpointer xep184)
+gboolean hbuf_remove_receipt(GList *hbuf, gconstpointer xep184)
 {
   hbuf_block *blk;
 
@@ -533,7 +533,8 @@
 
   for ( ; hbuf; hbuf = g_list_previous(hbuf)) {
     blk = (hbuf_block*)(hbuf->data);
-    if (blk->prefix.xep184 == xep184) {
+    if (!g_strcmp0(blk->prefix.xep184, xep184)) {
+      g_free(blk->prefix.xep184);
       blk->prefix.xep184 = NULL;
       blk->prefix.flags ^= HBB_PREFIX_RECEIPT;
       return TRUE;