examples: use xmpp_iq_new()

This commit is contained in:
Dmitry Podgorny
2017-07-06 15:47:19 +03:00
parent d8a86a54d5
commit b83347b464
2 changed files with 2 additions and 8 deletions

View File

@@ -55,10 +55,7 @@ void conn_handler(xmpp_conn_t * const conn, const xmpp_conn_event_t status,
fprintf(stderr, "DEBUG: connected\n");
/* create iq stanza for request */
iq = xmpp_stanza_new(ctx);
xmpp_stanza_set_name(iq, "iq");
xmpp_stanza_set_type(iq, "get");
xmpp_stanza_set_id(iq, "active1");
iq = xmpp_iq_new(ctx, "get", "active1");
xmpp_stanza_set_to(iq, "xxxxxxxxx.com");
query = xmpp_stanza_new(ctx);

View File

@@ -62,10 +62,7 @@ void conn_handler(xmpp_conn_t * const conn, const xmpp_conn_event_t status,
fprintf(stderr, "DEBUG: connected\n");
/* create iq stanza for request */
iq = xmpp_stanza_new(ctx);
xmpp_stanza_set_name(iq, "iq");
xmpp_stanza_set_type(iq, "get");
xmpp_stanza_set_id(iq, "roster1");
iq = xmpp_iq_new(ctx, "get", "roster1");
query = xmpp_stanza_new(ctx);
xmpp_stanza_set_name(query, "query");