Use libstrophe xmpp_iq_new convenience function

This commit is contained in:
James Booth
2016-08-20 20:20:38 +01:00
parent d61abd3577
commit 27263508c7
4 changed files with 70 additions and 142 deletions

View File

@@ -406,12 +406,9 @@ _send_bookmarks(void)
{
xmpp_ctx_t *ctx = connection_get_ctx();
xmpp_stanza_t *iq = xmpp_stanza_new(ctx);
xmpp_stanza_set_name(iq, STANZA_NAME_IQ);
char *id = create_unique_id("bookmarks_update");
xmpp_stanza_set_id(iq, id);
xmpp_stanza_t *iq = xmpp_iq_new(ctx, STANZA_TYPE_SET, id);
free(id);
xmpp_stanza_set_type(iq, STANZA_TYPE_SET);
xmpp_stanza_t *query = xmpp_stanza_new(ctx);
xmpp_stanza_set_name(query, STANZA_NAME_QUERY);