diff options
Diffstat (limited to 'src/xmpp/roster.c')
-rw-r--r-- | src/xmpp/roster.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xmpp/roster.c b/src/xmpp/roster.c index dd1b3747..64099335 100644 --- a/src/xmpp/roster.c +++ b/src/xmpp/roster.c @@ -211,14 +211,14 @@ roster_set_handler(xmpp_stanza_t *const stanza) } // if from attribute exists and it is not current users barejid, ignore push - Jid *my_jid = jid_create(connection_get_fulljid()); + char *mybarejid = connection_get_barejid(); const char *from = xmpp_stanza_get_from(stanza); - if (from && (strcmp(from, my_jid->barejid) != 0)) { + if (from && (strcmp(from, mybarejid) != 0)) { log_warning("Received alleged roster push from: %s", from); - jid_destroy(my_jid); + free(mybarejid); return; } - jid_destroy(my_jid); + free(mybarejid); const char *barejid = xmpp_stanza_get_attribute(item, STANZA_ATTR_JID); gchar *barejid_lower = g_utf8_strdown(barejid, -1); |