Use id handler for software version requests, handle errors

This commit is contained in:
James Booth
2015-08-05 00:26:29 +01:00
parent de747e3d46
commit 2a92169351
7 changed files with 78 additions and 7 deletions

View File

@@ -877,7 +877,11 @@ stanza_create_software_version_iq(xmpp_ctx_t *ctx, const char * const fulljid)
xmpp_stanza_t *iq = xmpp_stanza_new(ctx);
xmpp_stanza_set_name(iq, STANZA_NAME_IQ);
xmpp_stanza_set_type(iq, STANZA_TYPE_GET);
xmpp_stanza_set_id(iq, "sv");
char *id = create_unique_id("sv");
xmpp_stanza_set_id(iq, id);
free(id);
xmpp_stanza_set_attribute(iq, "to", fulljid);
xmpp_stanza_t *query = xmpp_stanza_new(ctx);